Skip to content

[Feature]: Add Per-Tool Execution Logs and Observability for Tools #460

@0xKoller

Description

@0xKoller

Problem statement

Currently, when a tool is invoked during an MCP server run (e.g., by an agent, user query, or workflow), there is zero built-in visibility into what happened. Developers have no straightforward way to observe:

  • Which specific tool was called
  • When the tool execution started and finished
  • How long the tool took to complete
  • Whether the tool call succeeded or failed
  • Any basic error message if it failed

Proposed solution

Emit structured logs for every tool/prompt/resource execution:

[tool] Executing 'get-weather' | input: { "location": "Buenos Aires" }
[tool] 'get-weather' completed | duration: 320ms | success

This should be enable/disable from the xmcp.config.ts

Package

xmcp (core framework)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions