Skip to content

feat: add execution observability for tools, prompts, and resources - #527

Open
FiammaMuscari wants to merge 2 commits into
basementstudio:canaryfrom
FiammaMuscari:feat/observability-logs
Open

feat: add execution observability for tools, prompts, and resources#527
FiammaMuscari wants to merge 2 commits into
basementstudio:canaryfrom
FiammaMuscari:feat/observability-logs

Conversation

@FiammaMuscari

Copy link
Copy Markdown
Contributor

Closes #460

This PR adds opt-in execution observability for tools, prompts, and resources in xmcp.

  • Adds an observability config in xmcp.config.ts
  • Emits structured JSON logs to stderr (safe for stdio transport)
  • Logs execution.start / execution.end with duration, success, and error
  • Supports optional input logging via includeInput
  • Centralized implementation via execution logger
  • Integrated across tools, prompts, and resources

Validation:

  • tested successful and failing tool execution
  • tested prompt and resource execution paths
  • verified config toggling (enabled / includeInput)
  • ensured no interference with stdout / MCP protocol
  • fixed non-serializable input handling
  • fixed non-throw tool error classification

Notes:

  • circular inputs cannot be tested end-to-end due to JSON transport constraints

@greptile-apps

greptile-apps Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@vercel

vercel Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

@FiammaMuscari is attempting to deploy a commit to the xmcp Team on Vercel.

A member of the Team first needs to authorize it.

@0xKoller 0xKoller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @FiammaMuscari!

Looks promising overall. Before a thorough review, could you please add:

  • A concrete usage example
  • Screenshots
  • Observability: ECS-compatible fields, OpenTelemetry-style events, W3C Trace Context + good human readability
  • Sensitive key redaction
  • Documentation updates

@valebearzotti

Copy link
Copy Markdown
Collaborator

What's the state of this PR?

@FiammaMuscari

FiammaMuscari commented Apr 15, 2026

Copy link
Copy Markdown
Contributor Author

Hi @valebearzotti ! should I rework this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants