Repository navigation
Conversation
McpRemoteTool now carries the server's annotations object verbatim and offers is_read_only() to read the readOnlyHint, treating a missing hint as not read-only per the protocol default. The contract version moves to 1.25 to record the added optional field. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Describe the annotations field kept on McpRemoteTool and the is_read_only helper so hosts can tell read-only tools from ones that change state. The transport tests were also reformatted to satisfy rustfmt. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewTiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). The change keeps a listed remote tool's `annotations` object on `McpRemoteTool` as an optional serde field, adds `McpRemoteTool::is_read_only()`, bumps the contract version to 1.25, and scrubs annotations in `StaticScrubTools`. Detailed lane evidence and any incomplete work are listed below. State: Ready for maintainer review Review snapshot
Completeness: Complete What changedAdds an optional `annotations` field to `McpRemoteTool` in crates/tinymcp-bus/src/transport/types.rs, verbatim behaviour hints such as `readOnlyHint`, omitted from the wire when absent; adds `McpRemoteTool::is_read_only()` which returns true only when `annotations.readOnlyHint` is boolean true, following the protocol default that an absent hint is not read-only. Bumps `CONTRACT_VERSION` to (1, 25) in crates/tinymcp-bus/src/version/mod.rs and pins it in crates/tinymcp-bus/src/version/mod_tests.rs. Scrubs the annotations object alongside `_meta` in `scrub_static_tools` at crates/tinymcp/src/processing/mod.rs. Documents the behaviour as Contract 1.25 in crates/tinymcp-bus/README.md and adds a test module for the transport types via crates/tinymcp-bus/src/transport/mod.rs. Features
Tests
FindingsNo active actionable findings. Before mergeNone. How this fits togetherflowchart LR
n0["...in_enum_tags_and_optional_render_defaults<br/>changed"]:::changed
n1["McpRemoteTool<br/>changed"]:::changed
n2["scrub_static_tools<br/>changed"]:::changed
n3["..._configured_credentials_before_bus_return<br/>changed"]:::changed
n4["bounded"]:::impacted
n5["json"]:::impacted
n6["limit_error"]:::impacted
n7["render_bounded"]:::impacted
n8["invalid_argument"]:::impacted
n9["transform_text"]:::impacted
n0 -->|calls| n5
n0 -->|tests| n5
n2 -->|uses| n1
n2 -->|calls| n4
n3 -->|calls| n5
n3 -->|tests| n5
n4 -->|calls| n6
n6 -->|calls| n8
n7 -->|calls| n6
n7 -->|calls| n8
n9 -->|calls| n4
n9 -->|calls| n6
n9 -->|calls| n8
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a2cb52fed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinymcp-bus/README.md, crates/tinymcp-bus/src/processing/mod_tests.rs, crates/tinymcp-bus/src/transport/mod.rs, crates/tinymcp-bus/src/transport/mod_tests.rs, crates/tinymcp-bus/src/transport/types.rs, crates/tinymcp-bus/src/version/mod.rs, crates/tinymcp-bus/src/version/mod_tests.rs.
$0.0015 · 159,772 in / 5,469 out · 13,440 cached (8%) · ladder/vectors-oai3, glm-5.3-flash · 335 embedded
critique: $0.0006 · 59,155 in / 1,767 out · 4,480 cached (8%) · glm-5.3-flash
security: $0.0006 · 65,812 in / 1,042 out · 8,960 cached (14%) · glm-5.3-flash
tests: $0.0001 · 14,455 in / 550 out · 0 cached (0%) · glm-5.3-flash
description: $0.0002 · 15,661 in / 358 out · 0 cached (0%) · glm-5.3-flash
Extend the static tool metadata redaction test to include an annotations object with a credential-bearing title and a readOnlyHint, asserting that the title is redacted while the boolean hint is preserved. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tool annotations were left untouched when scrubbing static tools, so any sensitive values they carried could leak through. They are now passed through the scrubber alongside the rest of the tool metadata. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
Clarify in the README that the optional annotations field on McpRemoteTool is scrubbed by StaticScrubTools along with the rest of a tool's metadata. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2279761381
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Adds a test module for the bus transport, covering the behaviour that was previously unverified. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinymcp/src/tinybus_module/mod_tests.rs.
$0.0018 · 167,823 in / 8,086 out · 4,480 cached (3%) · ladder/vectors-oai3, glm-5.3-flash · 393 embedded
critique: $0.0006 · 68,932 in / 503 out · 4,480 cached (6%) · glm-5.3-flash
security: $0.0007 · 67,669 in / 2,477 out · 0 cached (0%) · glm-5.3-flash
tests: $0.0001 · 14,886 in / 12 out · 0 cached (0%) · glm-5.3-flash
description: $0.0002 · 7,439 in / 4,668 out · 0 cached (0%) · glm-5.3-flash
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinymcp-bus/src/transport/mod.rs, crates/tinymcp-bus/src/transport/mod_tests.rs, crates/tinymcp-bus/src/transport/types.rs, crates/tinymcp/src/tinybus_module/mod_tests.rs.
$0.0046 · 292,557 in / 8,748 out · 0 cached (0%) · ladder/vectors-oai3, glm-5.3-flash, · 393 embedded
critique: $0.0031 · 147,931 in / 3,737 out · 0 cached (0%) · glm-5.3-flash
security: $0.0011 · 109,808 in / 3,659 out · 0 cached (0%) · glm-5.3-flash,
tests: $0.0001 · 15,153 in / 461 out · 0 cached (0%) · glm-5.3-flash
description: $0.0002 · 19,665 in / 891 out · 0 cached (0%) · glm-5.3-flash
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0007 · 479,897 in / 7,641 out · 65,280 cached (14%) · ladder/vectors-oai3, deepseek-v4.1-flash · 393 embedded
critique: $0.0004 · 310,925 in / 4,425 out · 41,856 cached (13%) · deepseek-v4.1-flash
security: $0.0001 · 128,257 in / 1,063 out · 16,384 cached (13%) · deepseek-v4.1-flash
tests: $0.0000 · 15,970 in / 8 out · 2,176 cached (14%) · deepseek-v4.1-flash
description: $0.0000 · 20,164 in / 522 out · 4,864 cached (24%) · deepseek-v4.1-flash
Summary
McpRemoteTooldropped each listed tool'sannotations. That object carries the MCP behaviour hints (readOnlyHint,destructiveHint, …), so a host calling a remote server's tools could not tell one that only reads from one that changes something. A host that asks the user before a write had to treat every tool as a write.This keeps
annotationsonMcpRemoteToolverbatim (optional, omitted when absent) and addsMcpRemoteTool::is_read_only(). Following the protocol's default, a tool withoutreadOnlyHint: trueis not read-only. The hints are documented as untrusted: a reason to ask the user, never a reason to skip a check.Related issue
None.
API or behavior changes
McpRemoteTool::annotations: Option<Value>, and new methodMcpRemoteTool::is_read_only.McpRemoteTool { .. }must now nameannotations.McpRemoteTool::newand serde decoding are unaffected. OpenHuman has two such literals (mcp/module_client.rs,mcp/module_client_tests.rs), which will getannotationsin the gitlink bump.None.Validation
cargo fmt --all -- --check: okcargo clippy --all-targets --all-features -- -D warnings: okcargo build --all-targets --all-features: okcargo test --all-features: all passRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features: okTests
tinymcp-bus/src/transport/mod_tests.rs:is_read_onlyis false without the hint, with it set tofalse, or with a non-boolean value.Also updated: the contract version pin, and the one struct literal in the processing tests. The
is_read_onlydoctest covers the example.Documentation
tinymcp-bus/README.md(the 1.25 entry), the version history comment, and rustdoc on the field and method.Checklist
#[allow(...)],#[ignore], or relaxed lints. The new test file uses the same test-only header as other*_tests.rs.envcontents in the diff or the description