Skip to content

Add MCP selector input schemas#942

Merged
ramimbo merged 2 commits into
ramimbo:mainfrom
szx19970521:codex/mcp-selector-schemas-844
Jun 5, 2026
Merged

Add MCP selector input schemas#942
ramimbo merged 2 commits into
ramimbo:mainfrom
szx19970521:codex/mcp-selector-schemas-844

Conversation

@szx19970521
Copy link
Copy Markdown
Contributor

@szx19970521 szx19970521 commented Jun 5, 2026

Bounty #844

Summary:

  • adds tools/list inputSchema metadata for get_bounty, covering id, bounty_id, issue_number, optional repo, and include_awards;
  • adds tools/list inputSchema metadata for list_bounty_attempts, covering bounty_id, issue_number, optional repo, include_expired, and bounded limit;
  • preserves existing tools/call runtime behavior and response payloads.

Duplicate/current check:

Validation:

  • python -m pytest tests\test_api_mcp.py -q -> 110 passed, 1 existing Starlette/httpx warning
  • python -m ruff check app\mcp.py tests\test_api_mcp.py -> passed
  • python -m ruff format --check app\mcp.py tests\test_api_mcp.py -> 2 files already formatted

Summary by CodeRabbit

  • Tests

    • Expanded validation coverage for bounty-related tool input schemas.
  • Improvements

    • Enhanced input validation for bounty retrieval and listing operations with structured schemas, field constraints, configurable filtering options, and stricter requirement enforcement.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 5, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 78b33ab8-a032-4b13-9177-302575594e8f

📥 Commits

Reviewing files that changed from the base of the PR and between 8d648a2 and b7ef1e9.

📒 Files selected for processing (2)
  • app/mcp.py
  • tests/test_api_mcp.py

📝 Walkthrough

Walkthrough

This PR adds structured input schema validation to two MCP bounty tools. get_bounty schema defines field constraints, field limits, and selector rules via oneOf plus dependentRequired. list_bounty_attempts schema adds similar constraints with a bounded limit parameter. Tests are expanded to validate schema structure, field ranges, boolean defaults, and selector requirements.

Changes

MCP Bounty Tool Schemas

Layer / File(s) Summary
Bounty tool input schemas and tests
app/mcp.py, tests/test_api_mcp.py
get_bounty gains inputSchema with constrained fields (id, bounty_id, issue_number, optional repo), include_awards boolean, selector oneOf rules, and dependentRequired for repo/issue_number pairing. list_bounty_attempts gains inputSchema with selector fields, include_expired, bounded limit, and matching validation rules. Test assertions expanded to verify schema field constraints, defaults, selector behavior, and dependent requirements.

Possibly related issues

  • ramimbo/mergework#794: Schema additions and test assertions for MCP tool inputSchema validation align with conformance testing work.
  • ramimbo/mergework#710: Directly addresses the proposal to add input schemas for get_bounty and list_bounty_attempts MCP tools.

Possibly related PRs

  • ramimbo/mergework#732: Modifies the same MCP tool definitions and selector behavior assertions.
  • ramimbo/mergework#334: Introduces the list_bounty_attempts tool; this PR extends its schema constraints.
  • ramimbo/mergework#908: Adds runtime support for bounty_id argument handling; this PR tightens the schema validation for that same parameter.
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add MCP selector input schemas' directly names the changed surface (MCP selector input schemas) and accurately reflects the main change in the changeset.
Description check ✅ Passed The description is largely complete with clear summary, evidence of bounty linkage, scope clarification, and validation results, though it omits the standard template's test evidence checkboxes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Mergework Public Artifact Hygiene ✅ Passed PR adds technical MCP schema definitions with no investment, price, off-ramp, payout, or security detail claims. Documentation properly disclaims current off-ramp limitations.
Bounty Pr Focus ✅ Passed Diff matches stated scope: get_bounty and list_bounty_attempts inputSchema added with proper constraints and selectors. Test assertions verify all schema properties. No unrelated changes detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@catcherintheroad-hub catcherintheroad-hub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed PR #942 at head b7ef1e9d01c6f33b4afa57bbc1312b89ecdc7d4a.

I checked the new tools/list schemas for get_bounty and list_bounty_attempts against the existing runtime selectors in app/mcp.py. The schema shapes match the implemented tool behavior: internal id / bounty_id / issue_number selection for get_bounty, bounty_id / issue_number selection for attempts, optional repo scoped to issue-number lookup, boolean toggles for awards/expired attempts, bounded attempt limit, and additionalProperties: false for the discoverability contract. The added assertions in tests/test_api_mcp.py cover the schema metadata without changing tools/call behavior.

Validation performed from an isolated worktree:

  • python -m pytest tests/test_api_mcp.py -q -> 110 passed, 1 existing Starlette/httpx warning
  • python -m pytest tests/test_api_mcp.py tests/test_mcp_tools.py tests/test_docs_public_urls.py -q -> 153 passed, 1 existing Starlette/httpx warning
  • python -m ruff check app/mcp.py tests/test_api_mcp.py -> passed
  • python -m ruff format --check app/mcp.py tests/test_api_mcp.py -> passed
  • python -m mypy app/mcp.py -> passed
  • python scripts/docs_smoke.py -> docs smoke ok
  • git diff --check origin/main...HEAD -> passed
  • git merge-tree --write-tree HEAD origin/main -> clean tree c372a4f329e893a1c145dbfc8a8ff94736b60057

GitHub currently reports mergeStateStatus: CLEAN; Quality/readiness/docs/image checks are green; CodeRabbit finished with no actionable comments.

@ramimbo ramimbo merged commit f51e07b into ramimbo:main Jun 5, 2026
2 checks passed
@ramimbo ramimbo added mrwk:accepted Maintainer accepted for payout mrwk:paid Ledger payment recorded labels Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mrwk:accepted Maintainer accepted for payout mrwk:paid Ledger payment recorded

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants