---
title: "POST /api/testing/mcp/seed-tool-call"
method: POST
path: "/api/testing/mcp/seed-tool-call"
tags: ["/api/testing"]
---

# POST /api/testing/mcp/seed-tool-call

`POST /api/testing/mcp/seed-tool-call`

## Request

- Base URL: `` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/testing/mcp/seed-tool-call`
- Auth: API key in header `X-API-Key`

Seed one `mcp_session_log` + one `mcp_tool_call_log` row so the MCP analytics E2E page has a
  visible tool-call row. Routes through the production `metabase.mcp.usage` recording helpers
  (rather than hand-rolled inserts) so the seeded rows can't drift from real MCP writes.
  Intended only for E2E tests.

## Request body

- object
  - `client_name` string, nullable: value must be a non-blank string.
  - `client_version` string, nullable: value must be a non-blank string.
  - `duration_ms` integer, nullable: value must be an integer greater or equal to than zero.
  - `error_code` integer, nullable
  - `error_message` string, nullable: value must be a non-blank string.
  - `status` string, nullable: value must be a non-blank string.
  - `tool_name` string, nullable: value must be a non-blank string.
  - `user_id` integer, required: value must be an integer greater than zero.

## Response `2XX`

Successful response

- object
  - `session_id` string, required: value must be a non-blank string.
  - `tool_name` string, required: value must be a non-blank string.

## Other responses

- `4XX`: Client error response
- `5XX`: Server error response

## Changes

- **2026-11-04** `2e178f5a7934`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/metabase/apis/metabase-api/changes/api/testing/mcp/seed-tool-call/post.md)

---

[API](https://skmtc.dev/metabase/apis/metabase-api.md) - [All operations](https://skmtc.dev/metabase/apis/metabase-api/llms.txt) - [OpenAPI document](https://skmtc.dev/metabase/apis/metabase-api/revisions/2e178f5a7934?raw)
