Skip to content

Conversation

@rodneyshibu
Copy link
Collaborator

@rodneyshibu rodneyshibu commented Nov 11, 2025

Context
As part of our onboarding devx, we want to add a set of steps and instructions to help users integrate their existing projects with Neon. We added this get started guide. This will typically be run through an init command that sets up the MCP server for the user.

What changes are proposed in this pull request?
This PR adds a load_resource tool to expose guides (starting with our Get Started resource) to the agent via a MCP tool. This is useful for two reasons.

  1. Some IDEs don't support MCP resources and only have access to MCP tools
  2. MCP resources are typically less likely to be loaded into context by agents (unless we explicitly instruct the agent to use the MCP resource)

How was this tested?
Tested this by deploying to preview env
Screenshot 2025-11-11 at 19 33 03

#LKB-6294

Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@rodneyshibu rodneyshibu marked this pull request as ready for review November 11, 2025 17:58
@github-actions
Copy link

🚀 Preview deployment ready: https://preview-mcp.neon.tech

@claude
Copy link

claude bot commented Nov 12, 2025

Code Review Summary

PR: #137 - Add new tool to load MCP resources
Files Changed: 4 files (+65, -4)
Review Focus: Architecture, Security, Logic, Testing


Review Statistics

  • Files Reviewed: 4
  • Lines Changed: 69 (65 additions, 4 deletions)
  • Issues Found: 4
    • 🔴 Critical: 0
    • 🟡 Important: 3
    • 🔵 Consider: 1

Key Findings

Most Critical Issues:

  1. [Testing] Missing Braintrust evaluation - The new load_resource tool lacks test coverage, which is required per CLAUDE.md guidelines. This is critical for ensuring the tool works correctly with LLM interactions.

  2. [Logic] Insufficient error handling - Network errors from GitHub API will bubble up as generic errors without helpful context about which resource failed. This impacts debuggability in production.

  3. [Logic] Limited error details - HTTP error responses only include status codes, missing status text and response body that could help diagnose issues like rate limiting or repository access problems.

What Looks Good:

  1. Architecture Pattern - The tool follows the correct registration pattern: definition in NEON_TOOLS, Zod schema in toolsSchema.ts, handler in tools.ts, and proper typing with ToolHandlers
  2. Error Handling Pattern - Uses InvalidArgumentError for invalid subjects, which is correctly handled by the server wrapper (server/errors.ts)
  3. Analytics & Observability - No manual tracking needed; the server wrapper automatically tracks tool calls, meeting MCP-specific requirements

Notes

  • ✅ Linting and build checks are automated by pr.yml workflow
  • ✅ Analytics tracking is handled automatically by the server wrapper (no manual trackEvent calls needed)
  • ✅ Error handling integrates with existing Sentry capture via server wrapper

The implementation is solid and follows project patterns correctly. The main gaps are around test coverage and error message quality for better debugging experience.

@rodneyshibu rodneyshibu merged commit a560add into main Nov 12, 2025
12 checks passed
@rodneyshibu rodneyshibu deleted the add-resource-tool branch November 12, 2025 15:46
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.

3 participants