Skip to content

Commit 04eda22

Browse files
waleedlatif1claude
andcommitted
fix(generate-docs): fix tool description extraction for two-step and name-mismatch patterns
Replace the fragile first-id/first-description heuristic with a per-id window search: for each id: 'tool_id' match, scan the next 600 chars (stopping before any params: block) for description: and name: fields. This correctly handles the two-step pattern used by Intercom and others where the ToolConfig export comes after a separate base object whose params: would have cut off the old approach. Add an exact-name fallback that checks tools.access for a tool whose name matches the operation label — handles cases where block op IDs are short aliases (e.g. Slack 'send') while the tool ID is more descriptive ('slack_message') but the tool name 'Slack Message' still differs. Remove the word-overlap scoring fallback which was producing incorrect descriptions (Intercom all saying 'Intercom API access token', Reddit Save/Unsave inverted, etc.). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3b58821 commit 04eda22

File tree

2 files changed

+196
-194
lines changed

2 files changed

+196
-194
lines changed

0 commit comments

Comments
 (0)