Skip to content

feat(mcp): add MCP-027, MCP-028, MCP-029 TypeScript and PHP parity rules - #100

Open
Paramjeet-singh-neu wants to merge 1 commit into
trustabl:mainfrom
Paramjeet-singh-neu:feat/mcp-ts-php-parity
Open

feat(mcp): add MCP-027, MCP-028, MCP-029 TypeScript and PHP parity rules#100
Paramjeet-singh-neu wants to merge 1 commit into
trustabl:mainfrom
Paramjeet-singh-neu:feat/mcp-ts-php-parity

Conversation

@Paramjeet-singh-neu

Copy link
Copy Markdown

Summary

  • Add MCP-027: TypeScript MCP mutating tool has no idempotency key (name_has_prefix without a trailing _ + negated param_name_matches on inputSchema), matching CSDK-016 / LC-016 / MCP-007.
  • Add MCP-028: Ambiguous TypeScript MCP tool name (name_in on registerTool / tool), matching MCP-003 / MCP-016 / MCP-018 / MCP-020 / MCP-022. TypeScript was the only MCP language surface with a description rule (MCP-011) but no ambiguous-name rule.
  • Add MCP-029: PHP MCP mutating tool has no idempotency key (name_has_prefix with _ + negated param_name_matches on the #[McpTool] signature), matching MCP-007.

IDs MCP-023..026 were already claimed in open PRs (#80 PHP untyped, #82 stdout, #85 TS timeout, #88 description quality), so this pack starts at 027. Original Track A items that are already filed (TS HTTP timeout, PHP untyped params) are not re-filed here.

No new predicates and no schema_version bump — both matches are already used by other packs. Discovery already captures TS ParamNames from Zod inputSchema and PHP ParamNames from method signatures.

Paired PRs (same branch name feat/mcp-ts-php-parity):

  • Engine fixture + tests: opened next
  • Rulebook rationale: opened next

Test plan

  • trustabl rules validate . on this pack
  • Engine go test ./internal/rules/ -run TestPolicyRules (fire + silent cases for all three IDs)
  • Confirm MCP-023..026 open PRs do not collide — this pack uses 027/028/029

Made with Cursor

Close the remaining MCP language gaps: TypeScript mutating tools without an idempotency key, TypeScript ambiguous names, and PHP mutating tools without an idempotency key.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jhumel-code

Copy link
Copy Markdown
Collaborator

Thanks @Paramjeet-singh-neu, this is a well-researched pack. MCP-029 is a faithful PHP analog of MCP-007 (same prefix list, same negated param_name_matches, matching medium severity and 0.55 confidence), and MCP-028 reuses MCP-003's exact word list at the same low/0.85 as every other language's ambiguous-name rule, so the pack sits cleanly next to its neighbors. For MCP-027, dropping the trailing underscore so createCharge matches is the right call for TypeScript, and lowering confidence to 0.5 is an honest adjustment for the broader prefix (a read-ish name like chargeStatus would also fire). You are also correct that no predicate or schema_version change is needed, and the engine pair trustabl/trustabl#135 mirrors both files byte-identically with fire and silent cases, so the sync contract is satisfied.

One coordination note before this can land: these IDs are also claimed by other open PRs. MCP-027 and MCP-028 appear in trustabl/trustabl#168 and #91, and MCP-029 appears in trustabl/trustabl#124, trustabl/trustabl#172, #80, and #94. Whichever lands first keeps the numbers and the others will need to renumber and rebase, so expect a possible renumber here. Separately, each shipped rule needs a rationale doc in trustabl-rulebook; I saw your note that one is opened on the same branch, and we can handle or pair on that side.

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.

2 participants