Skip to content

refactor: enhance tool descriptions and add optional filters #1

Merged
ventayol merged 1 commit into
mainfrom
chore/update-tool-descriptions
Apr 28, 2026
Merged

refactor: enhance tool descriptions and add optional filters #1
ventayol merged 1 commit into
mainfrom
chore/update-tool-descriptions

Conversation

@NikolaP93
Copy link
Copy Markdown
Contributor

Problem

MCP tool parameter schemas had no descriptions, causing the model to silently return wrong or empty results on
common queries. No errors thrown — just bad data.

Bugs found via manual eval:

  • search_logs — model used level: 3 for "error logs" (3=Trace, not Error). Got 0 results, looked like success
  • list_issues — type and issue_status had no documented values. Model passed strings that were silently ignored by
    the API
  • search_devices — filters was a free-form object with no documented keys. Model invented field names, got 400
    errors
  • get_crashes — no limit default, fetched up to 200 crashes including full stack traces, blew token limits
  • get_app_summary — date_range_start implied a range but is a single-day selector. Model thought it was getting 7
    days of data

Backend bug found:

  • search_devices — order param was required by the backend but not defaulted in the MCP. Every bare call returned
    500

Fix

  • Added .describe() to all undocumented parameters across logs.ts, issues.ts, devices.ts, apps.ts, crashes.ts
  • Added tool-level descriptions to get_crashes and list_issues to guide tool selection (model was using get_crashes
    when status filtering was needed, requiring list_issues)
  • Replaced free-form filters object in search_devices with explicit named parameters matching the backend's
    DownloadQuery struct
  • Defaulted search_devices order to last_active
  • Defaulted get_crashes limit to 20
  • Trimmed body field in crash list to 300 chars with pointer to get_crash_details for full stack trace

@NikolaP93 NikolaP93 requested a review from ventayol April 28, 2026 13:27
@ventayol ventayol merged commit 22eeafc into main Apr 28, 2026
1 check passed
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.

2 participants