Skip to content

feat(mcp): add read-only trust explanation and submission helpers#460

Closed
Kelvinchen03 wants to merge 8 commits into
JSONbored:mainfrom
Kelvinchen03:feat/mcp-trust-comparison-submission-helpers
Closed

feat(mcp): add read-only trust explanation and submission helpers#460
Kelvinchen03 wants to merge 8 commits into
JSONbored:mainfrom
Kelvinchen03:feat/mcp-trust-comparison-submission-helpers

Conversation

@Kelvinchen03
Copy link
Copy Markdown
Contributor

@Kelvinchen03 Kelvinchen03 commented May 21, 2026

Pull Request

Summary

Closes #450: Added three new read-only MCP helper tools for trust analysis, entry comparison, and submission guidance:

  • explain_entry_trust - Provides conservative trust analysis for registry entries, explicitly identifying available metadata and missing information

  • compare_entry_trust - Compares trust indicators and safety metadata across 2-5 entries side-by-side

  • get_submission_guidance - Provides category-specific submission guidance with field validation

All tools follow read-only patterns, use conservative language (no absolute security claims), and integrate seamlessly with existing MCP infrastructure.

Submission Source

  • New content file(s) added under content/<category>/
  • Existing content updated
  • Submission issue resolved (link it here): feat(mcp): add read-only trust and submission helpers #450
  • Direct content submissions include submittedBy and submittedByUrl frontmatter matching the PR author.
  • I did not modify README.md, generated registry outputs, or apps/web/public/downloads/** unless this is a maintainer/internal automation branch.
  • I did not request HeyClaude-hosted /downloads/... package hosting for community-submitted ZIP/MCPB artifacts.

Schema and Quality Checks

  • pnpm validate:content passed
  • pnpm validate:packages passed
  • pnpm scan:packages passed when package artifacts changed
  • pnpm audit:content ran and I reviewed findings
  • No forbidden fields were added (viewCount, copyCount, popularityScore)
  • Install/use/copy paths are practical and complete
  • Skill submissions include capability metadata when applicable (skillType, skillLevel, verificationStatus, verifiedAt, retrievalSources, testedPlatforms)

Validation

  • Local build passed (pnpm build)
  • I spot-checked the affected detail page(s)

Notes

Files Modified

packages/mcp/src/schemas.js

  • Added ExplainEntryTrustInputSchema, CompareEntryTrustInputSchema, GetSubmissionGuidanceInputSchema

  • Registered schemas in TOOL_INPUT_SCHEMAS

packages/mcp/src/registry.js

  • Implemented explainEntryTrust() function (~82 lines)

  • Implemented compareEntryTrust() function (~62 lines)

  • Implemented getSubmissionGuidance() function (~69 lines)

  • Added tools to READ_ONLY_TOOL_NAMES array

  • Added tool definitions to TOOL_DEFINITIONS array

  • Added routing in callRegistryTool() switch statement

packages/mcp/src/registry.d.ts

  • Added TypeScript function signatures for three new functions
  • Added schema exports

packages/mcp/src/schemas.d.ts

  • Added TypeScript type definitions for three new schemas

tests/mcp-server.test.ts

  • Updated description regex to include "explain", "compare", "get" patterns
  • Added test arguments for all three new tools

@Kelvinchen03 Kelvinchen03 requested a review from JSONbored as a code owner May 21, 2026 09:43
@superagent-security superagent-security Bot added the contributor:verified Contributor passed trust analysis. label May 21, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 21, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds three new read-only MCP tools to the registry: explainEntryTrust, compareEntryTrust, and getSubmissionGuidance. Each tool is backed by Zod input schema validation, a handler function that computes trust indicators and guidance metadata, and wiring into the tool dispatch system so they're discoverable and callable by MCP clients.

Changes

MCP Registry Trust Tools

Layer / File(s) Summary
Input Schema Contracts
packages/mcp/src/schemas.d.ts, packages/mcp/src/schemas.js
Three Zod input schemas define required and optional parameters for trust explanation (category/slug, optional includeMissingMetadata), trust comparison (entries array with bounds), and submission guidance (optional category and fields). Schemas register in TOOL_INPUT_SCHEMAS for json-schema generation.
Trust and Submission Tool Handlers
packages/mcp/src/registry.js
explainEntryTrust loads a single entry, derives trust indicators and source context from metadata, optionally includes missing-metadata analysis. compareEntryTrust loads multiple entries and returns per-entry trust objects with aggregated comparison notes. getSubmissionGuidance reads submission-spec.json, validates category against it, and returns category-specific field requirements, recommendations, and validation hints.
Tool Registration, Definitions, and Dispatch
packages/mcp/src/registry.d.ts, packages/mcp/src/registry.js
Tool names are added to READ_ONLY_TOOL_NAMES, tool definitions are generated with json-schemas and descriptions in TOOL_DEFINITIONS, function declarations and schema re-exports are added to the .d.ts public API, and callRegistryTool dispatch is extended with cases to route the three tool names to their handlers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • JSONbored/awesome-claude#430: Adds the explain_entry_trust and related trust tools that directly fulfill the request for trust-review helpers.
  • JSONbored/awesome-claude#450: Implements the exact read-only MCP registry tools and schemas (explainEntryTrust, compareEntryTrust, getSubmissionGuidance) requested in this feature.

Possibly related PRs

  • JSONbored/awesome-claude#411: Updates entryTrustSummary in the same registry file; the new trust tools will rely on that checksum field and trust summary logic.
  • JSONbored/awesome-claude#373: Extends the same MCP tool-definition and dispatch infrastructure that this PR builds upon for discovery and submission-draft tools.

Suggested labels

codex, risk-low

Poem

🔍 Trust flows through your entries now,
Comparing signals, showing how
Each beacon glows with metadata,
While guidance whispers "here's the path,"
Three tools stand tall in harmony. ✨

🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding three new read-only MCP tools for trust analysis and submission helpers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Security Pattern Review ✅ Passed New tools implement proper input validation via Zod schemas with regex constraints, safe file path handling, no dangerous functions, and no data exposure risks.
Client/Server Boundary Validation ✅ Passed PR modifies MCP server package code (not Next.js), which contains no client/server boundary directives, Next.js imports, or browser/server APIs requiring validation.
Logging Standards Compliance ✅ Passed Changed files (packages/mcp/* and tests/mcp-server.test.ts) are outside the check scope (apps/web/src and packages/web-runtime/src), so logging standards check is not applicable.
Description check ✅ Passed PR description comprehensively covers all required template sections with detailed implementation notes, resolved issue reference, and validation confirmations.

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

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@superagent-security superagent-security Bot added the pr:verified PR passed security analysis. label May 21, 2026
@coderabbitai coderabbitai Bot added risk-low Automated submission security/safety review found only low-risk signals codex labels May 21, 2026
Copy link
Copy Markdown
Owner

@JSONbored JSONbored left a comment

Choose a reason for hiding this comment

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

Thanks, but this cannot merge as-is. validate-mcp and endpoint validation both fail because packages/mcp/src/registry.js has invalid JS syntax, and the branch now overlaps with MCP trust helpers already present on main (get_submission_policy, explain_entry_trust, and review_entry_safety). Please rebase against current main, remove duplicate/overlapping tool wiring, align any remaining helper names with the current MCP API, and add passing MCP schema/response tests. Until then this does not fully satisfy #450.

@Kelvinchen03 Kelvinchen03 requested a review from JSONbored May 22, 2026 07:51
@Kelvinchen03 Kelvinchen03 force-pushed the feat/mcp-trust-comparison-submission-helpers branch from 607e490 to a7ec721 Compare May 22, 2026 08:14
@JSONbored
Copy link
Copy Markdown
Owner

Thanks, but this cannot merge as-is. validate-mcp and endpoint validation both fail because packages/mcp/src/registry.js has invalid JS syntax, and the branch now overlaps with MCP trust helpers already present on main (get_submission_policy, explain_entry_trust, and review_entry_safety). Please rebase against current main, remove duplicate/overlapping tool wiring, align any remaining helper names with the current MCP API, and add passing MCP schema/response tests. Until then this does not fully satisfy #450.

Thanks for the follow-up here. I’m going to close this PR.

The previous change request asked for the branch to be rebased against current main, remove duplicate/overlapping MCP helper wiring, align the remaining helper names/scope with the current MCP API, and add passing MCP schema/response tests.

The syntax/check failures are fixed now, but the substantive scope issues are still present:

  • The PR still overlaps with MCP helpers that already exist on main, especially the trust/submission guidance surface.
  • The PR body still describes explain_entry_trust as newly added, even though that helper already exists on main.
  • get_submission_guidance still duplicates or blurs behavior that is already covered by the existing submission guidance/policy helpers.
  • temp-main-registry.js is still included as an unrelated temporary artifact and should not be in the PR.
  • The current PR description no longer accurately reflects the actual diff.

@JSONbored JSONbored closed this May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex contributor:verified Contributor passed trust analysis. pr:verified PR passed security analysis. risk-low Automated submission security/safety review found only low-risk signals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(mcp): add read-only trust and submission helpers

2 participants