Advertise MCP balance output schema#1077
Open
modelsbridgeaicom-ship-it wants to merge 1 commit into
Open
Conversation
📝 WalkthroughWalkthroughThe PR adds structured output schema documentation to the MCP ChangesMCP get_balance output schema
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
szx19970521
approved these changes
Jun 7, 2026
Contributor
szx19970521
left a comment
There was a problem hiding this comment.
Approved at current head acb00a7aced5520b62800401f013c545d73bcb87.
Evidence checked:
- Inspected the 3-file diff:
app/mcp.py,tests/test_api_mcp.py, anddocs/agent-guide.md. MCP_BALANCE_OUTPUT_SCHEMAmatches the existingget_balancestructuredContent payload:account,balance_mrwk, andbalance_microunits.- The tool catalog change only advertises
outputSchema; runtime balance lookup/text response/structuredContent behavior remains unchanged. - The test pins required fields,
additionalProperties: False,balance_mrwkstring type, andbalance_microunitsminimum 0; existing runtime assertion still checks treasury structuredContent shape. - Docs change matches the existing structuredContent guidance.
Commands run locally on this PR head:
python -m pytest tests\test_api_mcp.py::test_mcp_tools_list_and_call -q-> 1 passed, 1 existing Starlette/httpx warning.ruff check app\mcp.py tests\test_api_mcp.py docs\agent-guide.md-> All checks passed.ruff format --check app\mcp.py tests\test_api_mcp.py-> 2 files already formatted.python scripts\docs_smoke.py-> docs smoke ok.
Eligibility/duplicate notes for review bounty tracking:
- PR is open, non-draft, mergeable, and CodeRabbit is green.
- Before submitting this review, I found no human reviews on this PR and no #933 issue comment referencing PR #1077.
- The PR body notes earlier PR #1035 covered the same gap but is dirty and not accepted/paid; this PR is current-main clean, so the reviewed artifact itself is distinct and current.
No blockers found.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
outputSchemaforget_balance, matching the structured balance payload already returned at runtime.account,balance_mrwk, andbalance_microunitsfields so schema-aware agents can rely ontools/listinstead of parsing the legacy text response.get_balancetext andstructuredContentruntime behavior unchanged.get_balanceadvertises its structured output schema throughtools/list.Bounty scope
Bounty #946
Refs #946
.
This is focused MCP structured-output metadata and conformance coverage.
Duplicate / stale-work check
mainstill returnsstructuredContentforget_balancebut does not advertiseoutputSchemafor the tool.DIRTYand has not been accepted or paid.Validation
python -m pytest tests\test_api_mcp.py::test_mcp_tools_list_and_call -q-> 1 passed, 1 existing Starlette/httpx warning.ruff check app\mcp.py tests\test_api_mcp.py docs\agent-guide.md-> All checks passed.ruff format --check app\mcp.py tests\test_api_mcp.py-> 2 files already formatted.python scripts\docs_smoke.py-> docs smoke ok.git diff --check-> clean, with the normal Windows LF-to-CRLF warning fordocs/agent-guide.md.git merge-tree --write-tree origin/main HEAD-> clean tree7762447113c0e738c8786f302ccb0b9ba7e09cef.Out of scope
No MCP runtime behavior changes, no ledger mutation, no wallet custody, no transfers, no treasury/proposal execution, no payout execution, no admin-token behavior, no bridge/exchange/off-ramp/cash-out behavior, no MRWK price behavior, and no private data or secrets.
Payout boundary: this is a submitted bounty claim only. It is not confirmed or withdrawable unless maintainers accept it and record payment.
Summary by CodeRabbit
New Features
get_balancetool now advertises a structured output schema with standardized fields for account and balance information, allowing callers to consume data programmatically instead of parsing text.Documentation
get_balancetool.