Conversation
Close the documented PHP fast-follow: type hints are optional, so unconstrained MCP input schemas are a real signal. Co-authored-by: Cursor <cursoragent@cursor.com>
Mirrors the rules-repo renumber across the rationale doc front-matter, the rule-by-rule defense heading, and both policy indexes. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
Closing this. The rules PR it documents (trustabl/agent-reliability-rules#80) was closed in the ID reconciliation: MCP-029 went to the TypeScript filesystem-write rule, which is a different rule. A rationale for MCP-029 here would now describe the wrong thing. |
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.
Rationale for MCP-029, the PHP sibling of
MCP-002, from trustabl-rules#80. Renumbered from MCP-023 to clear an ID collision with rules PRs #82/#85/#88/#91 — reasoning is on that PR. Front-matter matches the shipped YAML: medium/0.85, tool scope,fix_type: code.This extends the existing
docs/Policy/mcp/tool_definition.mdrather than adding a file, since MCP-029 lives inmcp/tool_definition.yamland the gate maps one doc per pack file. That doc already defends twelve rules across five languages; this is the thirteenth.Most of the new words go to why PHP and not the other four languages, since "just add it everywhere" is the obvious critique. Go, C# and Rust MCP tools are statically typed, so the signature always constrains the published schema and there's nothing to detect — a rule there would be dead weight. PHP hints are optional, which puts it in Python's position.
The confidence-gap section is the part I'd want checked.
HasTypedParamsis set when any parameter carries a type, so a single hint silences the whole signature, and I verified that against a live scan rather than reading it off the code —mixedHints(string $query, $limit)reports nothing despite$limitbeing bare. Tightening it would changeMCP-002and eight other packs that match the same field, so the doc records it as a deliberate engine-side follow-up rather than pretending it's a defect here. Schemas published outside the signature and#[McpResource]/#[McpPrompt]handlers are noted as out of scope too.check_rulebook.pygoes from 3 errors to 2 with this in place. The remaining two are OAI-112 and PYD-106, which came in with rules #47 before this branch and are being handled in #25 / #31. Until #80 merges the CI job validates against rulesmain, since it can't resolve a fork branch.Index changes are
mcp/POLICY_INDEX.mdplus the MCP row and totals in the master index. I left the other SDK indexes alone — rulesmainhas entries this book hasn't caught up with, and sweeping them in would turn a one-rule doc PR into an unreviewable catalog diff. Can do that separately if it's useful.Made with Cursor