# Service MCP Requests

## Service MCP Requests Actions

### CallRPC

Responds to a request using MCP protocol. Event metadata fields applicable for this action are as follows:

{% tabs %}
{% tab title="Fields (table)" %}

| Field          | Definition                                         | Example                 | Default |
| -------------- | -------------------------------------------------- | ----------------------- | ------- |
| Domain         | ID of the MCP server to interact with              | procurement\_specialist | -       |
| Input Element  | Json path for the input in request event payload   | message                 | -       |
| Output Element | Json path for the output in response event payload | output                  | -       |
| {% endtab %}   |                                                    |                         |         |

{% tab title="Fields (JSON Schema)" %}

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string",
          "description": "ID of the MCP server to interact with",
          "examples": ["procurement_specialist"],
          "default": null
        },
        "inputElement": {
          "type": "string",
          "description": "Json path for the input in request event payload",
          "examples": ["message"],
          "default": null
        },
        "outputElement": {
          "type": "string",
          "description": "Json path for the output in response event payload",
          "examples": ["output"],
          "default": null
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

With event metadata parameters as:

{% tabs %}
{% tab title="Parameters (table)" %}

| Parameter     | Definition                                                   | Example | Default |
| ------------- | ------------------------------------------------------------ | ------- | ------- |
| Input Pattern | Jmespath expression for converting input payload to MCP call | -       | -       |
| {% endtab %}  |                                                              |         |         |

{% tab title="Parameters (JSON Schema)" %}

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "parameters": {
          "type": "object",
          "properties": {
            "inputPattern": {
              "type": "string",
              "description": "Jmespath expression for converting input payload to MCP call",
              "default": null
            }
          }
        }
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

Input contents should match MCP server calls such as:

#### Initialize Request

```json
{
    "jsonrpc": "2.0",
    "method": "initialize"
}
```

#### Tool Listing Request

```json
{
    "jsonrpc": "2.0",
    "method": "tools/list"
}
```

#### Tool Call Request

```json
{
    "jsonrpc": "2.0",
    "method": "tools/call",
    "params": {
        "name": "Hello",
        "arguments": {}
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rierino.com/devops/api-event-and-process-flows/configuring-saga-steps/event-step/ml-and-ai-actions/service-mcp-requests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
