Skip to content

MCP claim: return overlaps as machine-readable JSON - #44

Open
shubhranillayek wants to merge 1 commit into
MaxonT:mainfrom
shubhranillayek:mcp-claim-machine-readable
Open

shubhranillayek wants to merge 1 commit into
MaxonT:mainfrom
shubhranillayek:mcp-claim-machine-readable

Conversation

@shubhranillayek

@shubhranillayek shubhranillayek commented Nov 23, 2026 •

Copy link
Copy Markdown

Closes #25

The MCP claim tool returned a plain sentence, so a client had to search the text for OVERLAP to know a clash happened. It now returns a small JSON string:

{"claimed": true, "message": "<unchanged human sentence>", "overlaps": [{"agent": "codex", "project": "api", "summary": "SDK upgrade", "files": ["app/payments/"]}]}
  • A client can json.loads the result and branch on overlaps without parsing prose.
  • The human sentence is unchanged inside message, so existing agents that text-search for OVERLAP keep working, and the refused: error path is unchanged.
  • Stdlib only (json); no new dependencies.

How I checked it

  • New test test_claim_returns_machine_readable_json in tests/test_mcp_server.py: no-overlap claim parses to claimed: true with empty overlaps; overlapping claim lists the other agent, project, summary and files, and the message still contains OVERLAP with codex.
  • python3 -m pytest -q tests: 476 passed, 1 skipped (MCP SDK not installed here), 14 subtests passed.
  • python3 tools/privacy_scan.py: 0 hits.

AI assistance disclosure (per CONTRIBUTING): an AI tool helped write this change.

The MCP `claim` tool returned a plain sentence, so a client had to
search the text for OVERLAP to know a clash happened. It now returns
a small JSON string {"claimed": true, "message": "<unchanged human
sentence>", "overlaps": [{"agent", "project", "summary", "files"}]},
so a client can branch on `overlaps` while the human sentence stays
intact inside `message` (a plain-text search for OVERLAP still finds
it). The `refused:` error path is unchanged.

Closes MaxonT#25

This branch has not been deployed

No deployments
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.

MCP claim tool: make an overlap machine-readable

2 participants