API referenceInstance API
GUIDE & REFERENCE

Mcp

Every registered mcp instance operation, with source-derived inputs, outputs, access policy, and errors.

This reference covers 6 HTTP operations registered by the Akasha daemon. Call these paths on your instance base URL. See authentication, errors, and coverage before integrating.

MethodPathOperation
POST/v1/mcp/tools/listMcp tools list
POST/v1/mcp/tools/callMcp tools call
GET/v1/mcp/healthMcp health
GET/v1/mcp/connectionMcp connection
GET/v1/mcp/statsMcp stats
GET/v1/mcp/historyMcp history

POST /v1/mcp/tools/list

List available MCP tools.

AvailabilitySource contract
Registrationconfig.enable_mcp
Runtime servicemcp
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

JsonMcpToolsListRequest

struct McpToolsListRequest {}

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({
        "tools": tool_list,
    })

Errors and validation

Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/mcp/handlers.rs:115. Registration: akasha-daemon/src/main.rs:4732.

POST /v1/mcp/tools/call

Call an MCP tool. The namespace and capabilities are derived from the authenticated capability token (injected by the auth layer), NOT from the request body. This prevents callers from escalating their privileges by sending an arbitrary namespace or capability set in the JSON payload.

AvailabilitySource contract
Registrationconfig.enable_mcp
Runtime servicemcp
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped. Handler additionally checks require(required_action, Some(required_keyspace)).

Request

JsonMcpToolsCallRequest

FieldRust typeRequired on inputNotes
nameStringYesThe name of the tool to call
argumentsJsonValueNo; optional or defaultedArguments to pass to the tool Serde: default
namespaceOption<String>No; optional or defaultedOptional caller-supplied namespace used by Cambium recall augmentation. Serde: default
struct McpToolsCallRequest {
    /// The name of the tool to call
    pub name: String,
    /// Arguments to pass to the tool
    #[serde(default)]
    pub arguments: JsonValue,
    /// Optional caller-supplied namespace used by Cambium recall augmentation.
    #[serde(default)]
    pub namespace: Option<String>,
}

JSON field accesses in handler: memory_types. Nested lookups are included; this list alone does not establish requiredness.

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

result

Errors and validation

Directly referenced error variants: Internal, InvalidRequest. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/mcp/handlers.rs:132. Registration: akasha-daemon/src/main.rs:4733.

GET /v1/mcp/health

MCP service health endpoint.

AvailabilitySource contract
Registrationconfig.enable_mcp
Runtime servicemcp
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({
        "status": "healthy",
        "tool_count": tools.tool_count(),
    })

Errors and validation

Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/mcp/handlers.rs:208. Registration: akasha-daemon/src/main.rs:4734.

GET /v1/mcp/connection

Mcp connection

AvailabilitySource contract
Registrationconfig.enable_mcp
Runtime servicemcp
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({
        "endpoint": "embedded",
        "protocol": "stdio",
        "status": if connected { "connected" } else { "disconnected" },
        "lastPing": chrono::Utc::now().to_rfc3339(),
        "version": "1.0",
        "capabilities": ["tools"]
    })

Errors and validation

Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:10552. Registration: akasha-daemon/src/main.rs:4735.

GET /v1/mcp/stats

Mcp stats

AvailabilitySource contract
Registrationconfig.enable_mcp
Runtime servicemcp
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

Implementation limit: Only tool_count is read from the registry; callsToday, avgLatencyMs, errorRate, and topTools are fixed placeholder values.

No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!({
        "totalTools": tool_count,
        "callsToday": 0,
        "avgLatencyMs": 0,
        "errorRate": 0,
        "topTools": []
    })

Errors and validation

Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:10566. Registration: akasha-daemon/src/main.rs:4736.

GET /v1/mcp/history

Mcp history

AvailabilitySource contract
Registrationconfig.enable_mcp
Runtime servicemcp
Handler dependenciesSee handler source and return expressions.

Access: Daemon authentication and capability namespace authority; memory-domain permissions apply where mapped.

Request

No typed JSON, query, or path extractor is declared in the handler signature. Headers or request objects may still be consumed; the signature below is authoritative.

Response

Declared return: Result<impl IntoResponse, DaemonError>

The following are the exact JSON construction expressions in the handler. Values such as rows, result, and delegated types are runtime values, not literal example payloads.

serde_json::json!(entries)

Errors and validation

Directly referenced error variants: none in the handler body. Middleware and delegated services can return additional errors described in the shared error reference.

Source: akasha-daemon/src/main.rs:10583. Registration: akasha-daemon/src/main.rs:4737.

On this page