Skip to content

fix: flatten MCP query_data schema and add null guards for error details - #11

Merged
Makisuo merged 5 commits into
mainfrom
fix/error-details-undefined-map
Mar 16, 2026
Merged

Makisuo merged 5 commits into
mainfrom
fix/error-details-undefined-map

Conversation

@Makisuo

@Makisuo Makisuo commented Mar 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Flattens the query_data MCP tool's discriminated union schema (anyOf/oneOf) into a single flat object schema — the Anthropic API rejects union schemas at the top level, which caused Claude Code to silently drop all MCP tools
  • Adds defensive ?? [] null guards in build-spec.ts and errors-by-type-table.tsx to prevent TypeError: Cannot read properties of undefined (reading 'map') crashes when MCP tool output data has missing or truncated fields

Test plan

  • bun typecheck passes (pre-existing unrelated error only)
  • Open /errors page, expand an error row — no crash
  • Use AI chat with error_detail tool — rendering works
  • Verify MCP tools are visible to Claude Code clients

🤖 Generated with Claude Code

Makisuo and others added 5 commits March 16, 2026 19:21
Flatten the query_data tool's discriminated union schema into a single
flat object schema. The Anthropic API rejects anyOf/oneOf/allOf at the
top level of tool input schemas, which caused Claude Code to silently
drop all tools from the MCP server.

Also adds defensive null guards in build-spec.ts and
errors-by-type-table.tsx to prevent TypeError crashes when MCP tool
output data has missing fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Landing: guard useAuth() behind PUBLISHABLE_KEY check so it's never
  called during SSR when ClerkProvider is absent (CI environment)
- Services test: fix expected search params to match applyTimeRangeSearch
  behavior (presets clear startTime/endTime, not preserve them)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- plan-gating: hasBringYourOwnCloudAddOn now checks customer.features,
  not product IDs
- traces: attribute filter params aren't forwarded to Tinybird queries,
  test assertions now match actual params
- traces/services index: preset selections clear startTime/endTime per
  applyTimeRangeSearch behavior
- settings: buildCustomer sets features for BYO entitlement check
- org-tinybird-settings: mock useAtomValue returns per-atom data and
  exports Atom for transitive imports

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use proper CustomerFeature objects instead of booleans in test fixtures
- Remove unused BRING_YOUR_OWN_CLOUD_ADD_ON_ID constant

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Makisuo
Makisuo merged commit 1d48a24 into main Mar 16, 2026
2 of 3 checks passed
JeremyFunk added a commit that referenced this pull request Sep 28, 2026
…cache_write_input_tokens (#11)

Older Strands releases write both cache buckets as
gen_ai.usage.cache_read_input_tokens / cache_write_input_tokens (captures
strands_user, strands_agents), which no alias list read. Both join the
default integration's cache aliases and the index's bucket key lists;
migration 0035 and the local v26 schema are regenerated with them, and the
materialization e2e seeds a Strands span carrying them.
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.

1 participant