Skip to content

feat(agents): give Pi tool registrations their full description#219

Merged
zzet merged 1 commit into
zzet:mainfrom
vitaliyslion:feat/agents-pi-full-tool-description
Jul 2, 2026
Merged

feat(agents): give Pi tool registrations their full description#219
zzet merged 1 commit into
zzet:mainfrom
vitaliyslion:feat/agents-pi-full-tool-description

Conversation

@vitaliyslion

@vitaliyslion vitaliyslion commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Brings the Pi extension's tool descriptions to parity with what real MCP clients already receive: gortex tools search gains a --format json mode, and ToolDescriptor (Go + CLI mirror) now carries the full untruncated Description alongside the existing first-sentence Summary. Pi's registerOneTool uses it directly instead of synthesizing a shortened description — removing a Pi-specific truncation that no other MCP agent was subject to.

Changes

  • Add Description field to mcp.ToolDescriptor and cmd/gortex's toolDescriptorCLI mirror, populated via strings.TrimSpace(e.desc).
  • Add --format json to gortex tools search, emitting {name, description} per match instead of the truncated single-line text listing.
  • Update the Pi extension (internal/agents/pi/extension/index.ts) to call tools search --format json, parse it with a new parseToolSearchJSON/firstSentence, and register each tool with its full description (falling back to summary, then name) instead of a hardcoded "(Gortex graph tool — prefer over raw file reads.)" suffix.

Testing

  • All tests pass (go test ./internal/mcp/... ./cmd/gortex/...)
  • New tests added for new functionality
  • Benchmarks run if performance-relevant (not performance-relevant)

Checklist

  • Code follows existing patterns in the codebase
  • No unnecessary abstractions added
  • Language extractor includes Meta["methods"] for interfaces (if applicable)
  • Methods have EdgeMemberOf edges to their containing type (if applicable)

@zzet zzet merged commit 85fcefb into zzet:main Jul 2, 2026
11 checks 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