KubeMQ
AiwayMCPReference

Tools Reference

Complete catalog of all 15 KubeMQ MCP tools — arguments, defaults, input schemas, response shapes, and a curl example for each.

The authoritative catalog of every tool the MCP connector exposes through tools/call: 11 core messaging tools plus 4 agent-bridge tools. For each tool you get its arguments, defaults, JSON Schema, a ready-to-run curl request, and the response shape.

Overview

The MCP connector advertises 15 tools in its tools/list response and runs them through the single POST /mcp endpoint on the shared HTTP server (port 9090, protocol version 2025-11-25). The 11 core tools are always registered; the 4 agent-bridge tools appear only when the A2A agent registry is present.

This page is the canonical argument and schema reference. The per-tool pages under Tools carry the same operations with examples in all nine languages. For the wire-level request/response forms see Endpoints; for the failure codes see Error codes.

Tool summary

#ToolCategoryRequired argsOptional args
1queue_sendQueuechannel, bodymetadata, tags, delay_seconds, expiration_seconds, max_receive_count, dead_letter_queue
2queue_receiveQueuechannel, max_messageswait_timeout_seconds
3queue_peekQueuechannel, max_messages(none)
4events_publishEventschannel, bodymetadata, tags
5events_store_publishEventschannel, bodymetadata, tags
6events_store_readEventschannel, max_messagesfrom_sequence, from_time
7events_store_read_latestEventschannelcount
8command_sendCommand / Querychannel, bodytimeout_seconds, metadata, tags
9query_sendCommand / Querychannel, bodytimeout_seconds, metadata, tags
10channel_listChannel(none)type, pattern
11channel_infoChannelchannel, type(none)
12agent_listAgent bridge(none)skill_tags
13agent_infoAgent bridgeagent_id(none)
14agent_sendAgent bridgeagent_id, messageblocking, context_id, timeout_seconds
15agent_queryAgent bridgeagent_id, methodparams

Calling convention

Every tool is invoked the same way: a tools/call JSON-RPC request naming the tool and passing its arguments object. Only name and arguments change between tools.

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "<tool_name>",
      "arguments": { }
    }
  }'

Every successful tools/call returns a result with a content array of typed blocks — KubeMQ uses text blocks carrying the operation result as a string (often a JSON string). A tool-level failure sets isError: true in the same envelope; the JSON-RPC response itself still succeeds with HTTP 200.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [{ "type": "text", "text": "..." }],
    "isError": false
  }
}

A channel that starts with the reserved prefix _AGENTS_. is rejected — see Channel resolution. Missing required arguments return a -32602 Invalid Params JSON-RPC error, not an isError result.

Queue tools

Durable, point-to-point queue messaging. See Queue tools for language examples.

queue_send

Send a message to a queue channel.

ArgumentTypeRequiredDefaultDescription
channelstringYesTarget queue channel. Must not start with the reserved prefix _AGENTS_.
bodystringYesMessage body content
metadatastringNo""Optional message metadata string
tagsobjectNo{}Key-value tags for message classification
delay_secondsintegerNo0Delay before the message becomes visible. 0 = immediately available
expiration_secondsintegerNo0TTL in seconds. 0 = no expiration
max_receive_countintegerNo0Max receives before dead-letter. 0 = unlimited
dead_letter_queuestringNo""Dead-letter queue channel name

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "queue_send",
      "arguments": {
        "channel": "example-queue",
        "body": "Hello from MCP",
        "metadata": "example-metadata",
        "tags": { "env": "dev", "source": "mcp-example" }
      }
    }
  }'

Response — a confirmation message in a single text block:

{
  "content": [{ "type": "text", "text": "Message sent successfully to queue 'example-queue'" }],
  "isError": false
}

Errors: reserved channel → isError: true; missing channel/body-32602.

queue_receive

Receive and consume messages from a queue channel. This is a destructive read — returned messages are removed from the queue.

ArgumentTypeRequiredDefaultDescription
channelstringYesSource queue channel
max_messagesintegerYes1Max messages to receive in a single call (1–100)
wait_timeout_secondsintegerNo5Long-poll wait time in seconds (1–60)

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "queue_receive",
      "arguments": { "channel": "example-queue", "max_messages": 5 }
    }
  }'

Response — a JSON array of received messages, serialized as the text payload:

{
  "content": [{ "type": "text", "text": "[{\"body\":\"Hello from MCP\",\"metadata\":\"example-metadata\",\"tags\":{\"env\":\"dev\",\"source\":\"mcp-example\"}}]" }],
  "isError": false
}

Errors: reserved channel → isError: true; a non-existent channel returns an empty result (no error).

queue_peek

Peek at messages without consuming them — a non-destructive read; messages stay in the queue.

ArgumentTypeRequiredDefaultDescription
channelstringYesSource queue channel
max_messagesintegerYes1Max messages to peek without consuming (1–100)

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 4,
    "method": "tools/call",
    "params": {
      "name": "queue_peek",
      "arguments": { "channel": "example-queue", "max_messages": 5 }
    }
  }'

Response — same shape as queue_receive, but the messages remain in the queue:

{
  "content": [{ "type": "text", "text": "[{\"body\":\"Hello from MCP\",\"metadata\":\"example-metadata\",\"tags\":{\"env\":\"dev\"}}]" }],
  "isError": false
}

Errors: reserved channel → isError: true; a non-existent channel returns an empty result (no error).

Events tools

Pub/sub and the persistent events store. See Events tools for language examples.

events_publish

Publish an ephemeral event (fire-and-forget; no persistence).

ArgumentTypeRequiredDefaultDescription
channelstringYesTarget events channel
bodystringYesEvent body content
metadatastringNo""Optional event metadata string
tagsobjectNo{}Key-value tags for event classification

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 5,
    "method": "tools/call",
    "params": {
      "name": "events_publish",
      "arguments": {
        "channel": "example-events",
        "body": "Event data",
        "metadata": "event-meta",
        "tags": { "source": "mcp-example" }
      }
    }
  }'

Response:

{
  "content": [{ "type": "text", "text": "Event published successfully to channel 'example-events'" }],
  "isError": false
}

Errors: reserved channel → isError: true; missing channel/body-32602.

events_store_publish

Publish a persistent event to the events store. Stored events receive a monotonic sequence number.

ArgumentTypeRequiredDefaultDescription
channelstringYesTarget events-store channel
bodystringYesEvent body content to store
metadatastringNo""Optional event metadata string
tagsobjectNo{}Key-value tags for event classification

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 6,
    "method": "tools/call",
    "params": {
      "name": "events_store_publish",
      "arguments": {
        "channel": "example-events-store",
        "body": "Stored event data",
        "metadata": "store-meta",
        "tags": { "source": "mcp-example" }
      }
    }
  }'

Response:

{
  "content": [{ "type": "text", "text": "Event published successfully to events store channel 'example-events-store'" }],
  "isError": false
}

Errors: reserved channel → isError: true; missing channel/body-32602.

events_store_read

Read stored events starting from a sequence number or a timestamp.

ArgumentTypeRequiredDefaultDescription
channelstringYesSource events-store channel
from_sequenceintegerNoStart from this sequence number. Mutually exclusive with from_time
from_timestringNoStart from this ISO 8601 timestamp. Mutually exclusive with from_sequence
max_messagesintegerYesMaximum number of messages to return (1–100)

from_sequence and from_time are mutually exclusive — supply at most one.

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 7,
    "method": "tools/call",
    "params": {
      "name": "events_store_read",
      "arguments": { "channel": "example-events-store", "from_sequence": 1, "max_messages": 10 }
    }
  }'

Response — a JSON array of stored events, each with its sequence and timestamp:

{
  "content": [{ "type": "text", "text": "[{\"body\":\"Stored event data\",\"metadata\":\"store-meta\",\"sequence\":1,\"timestamp\":\"2026-06-08T12:00:00Z\"}]" }],
  "isError": false
}

Errors: reserved channel → isError: true; a non-existent channel returns an empty result; missing channel-32602.

events_store_read_latest

Read the N most recent stored events.

ArgumentTypeRequiredDefaultDescription
channelstringYesSource events-store channel
countintegerNo1Number of most recent events to return

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 8,
    "method": "tools/call",
    "params": {
      "name": "events_store_read_latest",
      "arguments": { "channel": "example-events-store", "count": 3 }
    }
  }'

Response — the most recent events, newest first:

{
  "content": [{ "type": "text", "text": "[{\"body\":\"Stored event 3\",\"sequence\":3},{\"body\":\"Stored event 2\",\"sequence\":2},{\"body\":\"Stored event 1\",\"sequence\":1}]" }],
  "isError": false
}

Errors: reserved channel → isError: true; a non-existent channel returns an empty result; missing channel-32602.

Command & query tools

Synchronous request/reply. See Command & query tools for language examples.

command_send

Send a command and wait for acknowledgment from a subscriber.

ArgumentTypeRequiredDefaultDescription
channelstringYesTarget command channel
bodystringYesCommand body content
timeout_secondsintegerNo10Timeout in seconds waiting for the response
metadatastringNo""Optional command metadata string
tagsobjectNo{}Key-value tags for command classification

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 9,
    "method": "tools/call",
    "params": {
      "name": "command_send",
      "arguments": {
        "channel": "example-commands",
        "body": "do-work",
        "timeout_seconds": 10,
        "metadata": "cmd-meta",
        "tags": { "action": "process" }
      }
    }
  }'

Response (success):

{
  "content": [{ "type": "text", "text": "Command executed successfully on channel 'example-commands'" }],
  "isError": false
}

Errors: reserved channel, no subscriber (timeout), or subscriber rejection → isError: true; missing channel/body-32602.

query_send

Send a query and receive a data response from a subscriber.

ArgumentTypeRequiredDefaultDescription
channelstringYesTarget query channel
bodystringYesQuery body content
timeout_secondsintegerNo30Timeout in seconds waiting for the response
metadatastringNo""Optional query metadata string
tagsobjectNo{}Key-value tags for query classification

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 10,
    "method": "tools/call",
    "params": {
      "name": "query_send",
      "arguments": {
        "channel": "example-queries",
        "body": "get-data",
        "timeout_seconds": 30,
        "metadata": "qry-meta",
        "tags": { "action": "lookup" }
      }
    }
  }'

Response (success) — the subscriber's reply payload as the text block:

{
  "content": [{ "type": "text", "text": "{\"data\":\"query response payload from subscriber\"}" }],
  "isError": false
}

Errors: reserved channel, no subscriber (timeout), or subscriber rejection → isError: true; missing channel/body-32602.

Channel tools

Discovery and inspection of channels. See Channel tools for language examples.

channel_list

List channels, optionally filtered by type or name pattern. An empty list is a normal successful result.

ArgumentTypeRequiredDefaultDescription
typestringNoFilter by channel type (queues, events, events_store, commands, queries)
patternstringNoFilter by channel name pattern or prefix

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 11,
    "method": "tools/call",
    "params": {
      "name": "channel_list",
      "arguments": {}
    }
  }'

Response — a JSON array of channel descriptors:

{
  "content": [{ "type": "text", "text": "[{\"name\":\"example-queue\",\"type\":\"queues\",\"is_active\":true},{\"name\":\"example-events\",\"type\":\"events\",\"is_active\":true}]" }],
  "isError": false
}

Errors: invalid arguments → -32602. No tool-specific failures otherwise.

channel_info

Get metadata for a specific channel.

ArgumentTypeRequiredDefaultDescription
channelstringYesChannel name
typestringYesChannel type (queues, events, events_store, commands, queries)

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 12,
    "method": "tools/call",
    "params": {
      "name": "channel_info",
      "arguments": { "channel": "example-queue", "type": "queues" }
    }
  }'

Response (success) — channel metadata with traffic counters:

{
  "content": [{ "type": "text", "text": "{\"name\":\"example-queue\",\"type\":\"queues\",\"is_active\":true,\"incoming\":5,\"outgoing\":3}" }],
  "isError": false
}

Errors: non-existent channel → isError: true.

Agent-bridge tools

These 4 tools appear in tools/list only when the A2A agent registry is present. They turn an MCP client into an A2A caller. See Agent-bridge tools for language examples and the A2A connector for the agent model.

agent_list

List registered agents, optionally filtered by skill tags. An empty list is a normal successful result.

ArgumentTypeRequiredDefaultDescription
skill_tagsarray of stringNoFilter agents by skill tags

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 13,
    "method": "tools/call",
    "params": {
      "name": "agent_list",
      "arguments": {}
    }
  }'

Response — a JSON array of agents with their skills:

{
  "content": [{ "type": "text", "text": "[{\"agent_id\":\"echo-01\",\"name\":\"Echo Agent 01\",\"skills\":[{\"id\":\"echo\",\"name\":\"Echo\",\"tags\":[\"test\",\"echo\"]}]}]" }],
  "isError": false
}

Errors: invalid arguments → -32602. No tool-specific failures otherwise.

agent_info

Get detailed metadata for a specific agent.

ArgumentTypeRequiredDefaultDescription
agent_idstringYesAgent identifier to look up

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 14,
    "method": "tools/call",
    "params": {
      "name": "agent_info",
      "arguments": { "agent_id": "echo-01" }
    }
  }'

Response (success) — the agent's card, including its registered HTTP url and skills:

{
  "content": [{ "type": "text", "text": "{\"agent_id\":\"echo-01\",\"name\":\"Echo Agent 01\",\"description\":\"echo agent\",\"version\":\"1.0.0\",\"url\":\"http://localhost:18080/\",\"skills\":[{\"id\":\"echo\",\"name\":\"Echo\",\"tags\":[\"test\",\"echo\"]}]}" }],
  "isError": false
}

Errors: non-existent agent → isError: true.

agent_send

Send a message to an agent. The connector builds a message/send envelope and forwards it over the broker as a Query to _AGENTS_.agents/<agent_id>.

ArgumentTypeRequiredDefaultDescription
agent_idstringYesTarget agent identifier
messagestringYesMessage content to send to the agent
blockingbooleanNotrueWait for the agent response if true; fire-and-forget if false
context_idstringNoConversation context ID for multi-turn interactions
timeout_secondsintegerNoTimeout in seconds. The server adds a +10s GatewayTimeoutBuffer

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 15,
    "method": "tools/call",
    "params": {
      "name": "agent_send",
      "arguments": { "agent_id": "echo-01", "message": "hello from MCP" }
    }
  }'

Response (success) — the agent's reply payload as the text block:

{
  "content": [{ "type": "text", "text": "{\"echo\":{\"method\":\"message/send\",\"params\":{\"message\":\"hello from MCP\"}},\"received_headers\":{}}" }],
  "isError": false
}

Errors: non-existent agent or timeout exceeded → isError: true.

agent_query

Query an agent with a specific JSON-RPC method.

ArgumentTypeRequiredDefaultDescription
agent_idstringYesTarget agent identifier
methodstringYesQuery method to invoke (tasks/get, tasks/cancel, or a custom method)
paramsobjectNoMethod-specific parameters

curl -X POST http://localhost:9090/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{
    "jsonrpc": "2.0",
    "id": 16,
    "method": "tools/call",
    "params": {
      "name": "agent_query",
      "arguments": { "agent_id": "echo-01", "method": "tasks/get" }
    }
  }'

Response (success):

{
  "content": [{ "type": "text", "text": "{\"echo\":{\"method\":\"tasks/get\",\"params\":{}},\"received_headers\":{}}" }],
  "isError": false
}

Errors: non-existent agent or timeout exceeded → isError: true.

Was this page helpful?

On this page