---
title: "Execute MCP tool"
method: POST
path: "/api/mcp/call-tool"
tags: ["MCP"]
---

# Execute MCP tool

`POST /api/mcp/call-tool`

## Request

- Base URL: `/api/plugins/consensys-asko11y-app/resources` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/plugins/consensys-asko11y-app/resources/api/mcp/call-tool`
- Auth: one of:
  - API key in cookie `grafana_session`
  - HTTP bearer

Executes an MCP tool with RBAC enforcement. The tool must be available in the user's filtered tool list (see `/api/mcp/tools`). Admin/Editor roles can access all tools, while Viewer role can only access tools with `readOnlyHint: true` annotation. RBAC is enforced both at tool listing time and at execution time (double-check pattern).

## Headers

- `X-Grafana-Org-Id` string

## Request body

- CallToolParams: Parameters for calling an MCP tool
  - `name` string, required: Tool name
  - `arguments` object: Tool-specific arguments matching the tool's inputSchema
  - `orgName` string: Organization name (optional, for multi-tenant routing)
  - `scopeOrgId` string: Scope organization ID (optional, for multi-tenant routing)

## Response `200`

Tool execution result

- CallToolResult: Result of MCP tool execution
  - `content` object[], required
    - `type` string: Content type (e.g., 'text')
    - `text` string: Content text
  - `isError` boolean: True if tool execution failed

## Other responses

- `400`: Bad request (invalid parameters or malformed request body)
- `401`: Unauthorized (missing or invalid authentication)
- `403`: Access denied (RBAC violation)
- `404`: Tool not found
- `500`: Internal server error

---

[API](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api.md) - [All operations](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/revisions/ee3ccd0f186d?raw)
