Skip to content

Enrich MCP context for AI agents#98

Merged
renardeinside merged 1 commit intomainfrom
feat/improve-mcp-context
Feb 19, 2026
Merged

Enrich MCP context for AI agents#98
renardeinside merged 1 commit intomainfrom
feat/improve-mcp-context

Conversation

@renardeinside
Copy link
Copy Markdown
Collaborator

Summary

Closes #94. Reduces the file reads AI agents need (8+) to discover project patterns before writing code.

  • Enrich routes tool output — adds parameters, request/response schemas, hook names, and $ref resolution to every route
  • Rewrite get_route_info code generation — produces complete Suspense/ErrorBoundary scaffold with proper hook call args (selector() spreading, path params, cache invalidation via invalidateQueries)
  • Improve all 12 tool descriptions — prescriptive, actionable descriptions that tell agents when to call each tool
  • Expand apx://info resource — adds project structure, key frontend/backend patterns, and numbered workflow
  • Add apx://project/{app_path} resource template — returns app metadata, enriched routes, and installed UI components as JSON

Test plan

  • cargo build -p apx-mcp — no warnings
  • cargo test -p apx-mcp — 29 tests pass (15 new)
  • cargo clippy -p apx-mcp — no warnings
  • Manual: start MCP server, call routes and get_route_info against a real project

🤖 Generated with Claude Code

Reduce file reads needed by AI agents to discover project patterns
by enriching MCP tools with richer output, better descriptions, and
actionable code examples.

- Enrich routes tool with parameters, request/response schemas, hook names
- Rewrite get_route_info with Suspense/ErrorBoundary scaffold and proper
  hook call args (selector spread, params, cache invalidation)
- Add OpenAPI helpers: $ref resolution, param merging, body/response extraction
- Update all tool descriptions to be prescriptive and actionable
- Expand apx://info with project structure, frontend/backend patterns, workflow
- Add project context resource template (apx://project/{app_path})
- Add 15 new unit tests (29 total)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@renardeinside renardeinside merged commit 0b8d927 into main Feb 19, 2026
3 checks passed
@renardeinside renardeinside deleted the feat/improve-mcp-context branch February 19, 2026 20:19
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.

🤖 [FEEDBACK] Reduce AI context-gathering overhead with richer MCP tools and skill templates

1 participant