Skip to content

docs(mcp): Align search_traces ADR with search_depth schema#8472

Merged
yurishkuro merged 1 commit into
jaegertracing:mainfrom
farhann-saleem:docs/mcp-search-depth-docs-clean
May 3, 2026
Merged

docs(mcp): Align search_traces ADR with search_depth schema#8472
yurishkuro merged 1 commit into
jaegertracing:mainfrom
farhann-saleem:docs/mcp-search-depth-docs-clean

Conversation

@farhann-saleem
Copy link
Copy Markdown
Contributor

updates the MCP ADR docs so the documented search_traces input matches the live MCP schema.
ADR documents limit for search_traces, but the actual MCP input type uses search_depth

Why

The MCP README points readers to ADR-002 for design details in [README.md](jaeger/cmd/jaeger/
internal/extension/jaegermcp/README.md:15), so this ADR is effectively user-facing documentation.

The live MCP schema is:

  • SearchDepth int with JSON field search_depth in search_traces.go
    (jaeger/cmd/jaeger/internal/extension/jaegermcp/internal/types/search_traces.go:35)

The stale docs were:

  • tool spec using limit in 002-mcp-server.md
  • (jaeger/docs/adr/002-mcp-server.md:99)
  • sample JSON using "limit": 10 in 002-mcp-server.md
  • (jaeger/docs/adr/002-mcp-server.md:170)

Checklist

AI Usage in this PR (choose one)

See AI Usage Policy.

it was founded by manually reading -

  • [X ] None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Copilot AI review requested due to automatic review settings May 3, 2026 06:22
@farhann-saleem farhann-saleem requested a review from a team as a code owner May 3, 2026 06:22
@dosubot dosubot Bot added the documentation label May 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the MCP ADR to better match the current search_traces input schema used by the Jaeger MCP extension, so the design documentation remains aligned with user-facing behavior referenced from the extension README.

Changes:

  • Replaces the documented search_traces input field from limit to search_depth in the ADR tool specification.
  • Updates the sample search_traces JSON input to use search_depth.
  • Adds a note explaining that MCP and Jaeger's HTTP query APIs use different parameter names for similar concepts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/adr/002-mcp-server.md Outdated
duration_min: duration string (optional, e.g., "2s", "100ms")
duration_max: duration string (optional)
limit: integer (default: 10, max: 100)
search_depth: integer (optional, default: 10, max: 100) - Maximum search depth. Depending on the storage backend, this may behave like a limit, but it is not guaranteed to be an exact SQL-style LIMIT.
Comment thread docs/adr/002-mcp-server.md Outdated
"duration_min": "2s", // optional
"duration_max": "10s", // optional
"limit": 10 // optional: default 10, max 100
"search_depth": 10 // optional: default 10, max 100
Comment thread docs/adr/002-mcp-server.md Outdated
```

> [!NOTE]
> The MCP `search_traces` tool uses `search_depth`. Jaeger's HTTP query API uses `limit`, so examples from the HTTP API are not directly interchangeable with MCP tool inputs.
Signed-off-by: farhann_saleem <chaudaryfarhann@gmail.com>
@farhann-saleem farhann-saleem force-pushed the docs/mcp-search-depth-docs-clean branch from ae6d5be to 8801122 Compare May 3, 2026 07:18
@farhann-saleem
Copy link
Copy Markdown
Contributor Author

Addressed. The ADR now reflects that search_depth is capped by the server-configured MaxSearchResults, not a hard-coded 100, and the note now distinguishes MCP search_depth from Jaeger’s other query API parameter names, including v3 query.num_traces.

Copy link
Copy Markdown
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

ADRs are NOT user documentation, they are decision records. They typically capture the state of the system when they are written.

@yurishkuro yurishkuro merged commit 467ccce into jaegertracing:main May 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants