mcp_tools

Invoke an MCP tool by name.

This endpoint allows MCP callers to invoke Max AI tools directly without going through the full LangChain conversation flow.

Scopes are resolved dynamically per tool via dangerously_get_required_scopes.

post/api/projects/{project_id}/mcp_tools/{tool_name}/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/mcp_tools/{tool_name}/
  • Auth: none declared

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

tool_namestring required

Request body

argsobject

Arguments validated against the selected tool's schema.

Response

contentstring required

Formatted tool output for the model.

structured_contentobject nullable

Structured tool output for native widgets.

successboolean required

Whether the tool completed successfully.

error_type'validation' | 'permission' | 'timeout' | 'memory_limit' | 'rate_limited' | 'api_5xx' | 'internal' nullable

Failure category for MCP analytics.

error_codestring nullable

Machine-readable name of the leaf failure for MCP analytics, such as a ClickHouse error name.

Changes

No recorded changes to this operation across all 1 revision of this API.