get_agent_conversation_details cuts input messages at 4,000 chars and doesn't say lookups are limited to 30 days

Offen
#2,558 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
40/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
typescript

Rechercherichtung

Start in packages/mcp-core/src/tools/catalog/get-agent-conversation-details.ts, around the GenAI attribute handling (roughly lines 237-250 and 363-375) and the start/end parameter descriptions (lines 689-698). Check how truncatedFields is reported and whether get_span_details could return gen_ai.input.messages. Done means the 30-day limit is stated in the param descriptions and the truncated output points to a way to read the full value.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

MCP mcp-feedback-pattern

What happens

An agent reviewing flagged agent conversations needed the earlier user messages in each LLM call's input (prior customer-facing messages). get_agent_conversation_details didn't give it a way to read them:

  1. Input messages are cut at 4,000 characters, with no way to read the rest. buildGenAIAttributes truncates gen_ai.input.messages (and the other raw GenAI fields) to MAX_RAW_GEN_AI_ATTRIBUTE_LENGTH and appends ... [truncated]. The timeline user message only carries the last user message from the input (extractUserContent uses findLast), so earlier messages exist only in the truncated genAi.inputMessages. I found no tool that returns the full value: get_span_details fetches the trace without requesting additional_attributes, so it likely doesn't include gen_ai.input.messages, and the result doesn't say where to read the rest.

  2. start/end don't say the lookup is limited to the last 30 days. The agent passed a ~99-day window (start about 3 months back), and Sentry returned the documented 400 (start time cannot be older than 30 days). The param descriptions only say "Start of the lookup window; requires end."

Evidence

  • Feedback MCP-SERVER-GWN (kind missing, impact blocked, tool get_agent_conversation_details, server 0.42.0).
  • Session (sentry/mcp-server spans, 2026-11-27 ~14:09–14:10 UTC): 27 ok + 3 errored get_agent_conversation_details calls, no other tools. Errored call: trace bdb9d347c8e743179cae0587c8f2eb30, upstream GET /api/0/organizations/<org>/agents/conversations/<id>/?per_page=1000&start=2026-08-20T00:00:00Z&end=2026-11-27T14:08:39Z&project=-1 → 400. Successful calls used the default statsPeriod=30d → 200.

Possible fixes

  • Let the agent read a truncated GenAI field in full, e.g. a spanId + field option on this tool, or include gen_ai.input.messages in get_span_details output, and say which tool to use next to truncatedFields.
  • Say "within the last 30 days" on start/end (and/or reject older bounds before the call with that message).

Not verified: whether the customer's SDK recorded the full message history on the spans (SDKs can trim gen_ai.input.messages before sending). Conversations older than 30 days are a documented Sentry product limit (owner: @getsentry/agent-tracing), not an MCP bug.

Reports: 1

via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_0ce51fdd7c171412b78ad27ec7509ae1.

--

View Session [Sentry]

Vorherrschende Sprache
TypeScript
Sterne
975
Forks
189
Ø Merge
19 Std. 57 Min.
Gemergte PRs (30 T.)
542

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus getsentry/toolkit

Alle Issues in getsentry/toolkit

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.