Skip to content

Add collect tools and Breeze API fixture for feedback testing#3

Merged
jpr5 merged 4 commits into
mme/collectfrom
mme/fixtures-plus-collect
Apr 2, 2026
Merged

Add collect tools and Breeze API fixture for feedback testing#3
jpr5 merged 4 commits into
mme/collectfrom
mme/fixtures-plus-collect

Conversation

@mme

@mme mme commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Collect tools: generic YAML-configured MCP tools that let agents write structured data (e.g. feedback) back to the server. Schema defined in config, validated with Zod, stored as JSONB.
  • Breeze API fixture: a mock weather API (npm run fixture:breeze-api) with correct and intentionally-broken documentation variants, for testing agent behavior when docs mislead.
  • PGlite support: in-process PostgreSQL via DATABASE_URL=pglite:///path so fixtures run without Docker.
  • npm run claude: launches Claude Code in an isolated temp directory wired to the local MCP server.

Testing it

Three terminals:

# 1. Start the mock weather API
npm run fixture:breeze-api

# 2. Start mcp-docs with the BROKEN docs (the interesting case)
npm run fixture:breeze-broken-docs

# 3. Launch Claude Code connected to local mcp-docs
npm run claude

Then ask the agent: "Get the weather in Berlin"

The agent will search the (broken) docs, try the wrong endpoint/method, fail, and should submit feedback via submit-breeze-feedback. Swap terminal 2 for npm run fixture:breeze-docs to compare with correct docs.

Test plan

  • npm test — unit tests for collect tool schema conversion, MCP protocol, and config validation
  • Terminal 1+2+3 workflow above with broken docs → agent submits negative feedback
  • Same workflow with correct docs → agent succeeds and submits positive feedback

🤖 Generated with Claude Code

@mme mme force-pushed the mme/fixtures-plus-collect branch from 0b1aaff to 7279d41 Compare April 2, 2026 17:57
@mme mme changed the base branch from main to mme/fixtures April 2, 2026 17:58
@mme mme force-pushed the mme/fixtures-plus-collect branch from 7279d41 to 54e6e36 Compare April 2, 2026 18:07
mme added 2 commits April 2, 2026 20:10
Adds a collect tool to both Breeze fixture configs so agents can
report whether search results were accurate. Updates the search tool
description to prompt agents to submit feedback after using results.
- Use tool object (not toolType var) in exhaustive switch default
- Remove unused intermediate type variable in server dispatch
- Remove redundant blank line in collect tool
- Remove backwards-compat config defaulting tests (covered by schema)
- Improve MCP request logging with type-aware formatting
- Simplify claude npm script variable naming
- Fix README search tools header casing
@mme mme force-pushed the mme/fixtures-plus-collect branch from 54e6e36 to 6759dd4 Compare April 2, 2026 18:11
jpr5 added 2 commits April 2, 2026 11:20
…tests

- index.ts: fix shutdown catch to suppress both PGlite ("not initialized")
  and pg ("DATABASE_URL") expected errors instead of only the latter
- source-indexer.ts: throw instead of returning silently when local source
  path doesn't exist, so orchestrator records status: 'error'
- source-indexer.ts: clarify computeLocalSha JSDoc (uses mtimes, not content)
- orchestrator.ts: fix isStale JSDoc to say "configured threshold" not "24h"
- tool-config.test.ts: restore backwards-compat defaulting tests
Base automatically changed from mme/fixtures to mme/collect April 2, 2026 18:42
@jpr5 jpr5 merged commit d853439 into mme/collect Apr 2, 2026
@jpr5 jpr5 deleted the mme/fixtures-plus-collect branch April 2, 2026 18:42
@jpr5 jpr5 mentioned this pull request Apr 2, 2026
jpr5 added a commit that referenced this pull request Apr 2, 2026
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