Skip to content

Refactor: Trim tool parameter descriptions#336

Merged
tw-garymeehan merged 1 commit into
mainfrom
gary/trim-param-descriptions
May 18, 2026
Merged

Refactor: Trim tool parameter descriptions#336
tw-garymeehan merged 1 commit into
mainfrom
gary/trim-param-descriptions

Conversation

@tw-garymeehan
Copy link
Copy Markdown
Contributor

Summary

Builds on #293, #303, #306. Where a JSON Schema field (Default, Format, AnyOf.Required, MinProperties) already carries a constraint, delete the duplicate English prose; add the schema field at the few sites where prose was the only enforcement.

  • New helpers: UserGroupsSchema, DateTimeFilterSchema, DateFilterSchema.
  • Trimmed helpers: VerboseSchema, MatchAllTagsSchema (drop entity arg, add Default: false).
  • Sweep applied across twprojects, twdesk, twspaces.
  • No behavioural change — descriptions only.

mcp-tokens delta vs main

base (main)        38,515
current            34,744
delta              -3,771  (-9.79%)

Test plan

  • gofmt -s -l . clean
  • go vet ./... clean
  • go test ./... green
  • TestToolInputSchemasArrayItems passes
  • cmd/mcp-tokens -base main shows expected reduction
  • Spot-check a few representative tool schemas via cmd/mcp-http-cli list-tools

🤖 Generated with Claude Code

Delete prose that duplicates JSON Schema fields (Default, Format,
AnyOf.Required, MinProperties). Adds UserGroupsSchema and date-filter
helpers; trims VerboseSchema and MatchAllTagsSchema.

-9.8% tokens across the tool registry, no behavioral change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tw-garymeehan tw-garymeehan requested a review from a team as a code owner May 18, 2026 12:19
@tw-garymeehan tw-garymeehan merged commit 3ba399c into main May 18, 2026
3 checks passed
@tw-garymeehan tw-garymeehan deleted the gary/trim-param-descriptions branch May 18, 2026 12:47
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