Common Errors
{"error":"Unauthorized"}
This is the most common error for new tool builders.
Why This Happens
What You CAN Test Locally (No Auth Required)
These MCP methods work without authentication:Testing tools/call Locally
The tools/call method requires a valid JWT from the Context Platform. Options for testing:
- Test tool logic directly: write test files that call your tool handler functions directly, bypassing the MCP transport
- Temporarily bypass middleware: comment out
verifyContextAuthduring development: - Test on deployed server: SSH into your server and test against localhost after deployment
End-to-End Testing
For full end-to-end testing through the Context Platform:- Deploy to HTTPS: use Railway, Vercel, or set up Caddy/nginx
- Register on marketplace: go to ctxprotocol.com/contribute
- Test through the Context app: ask the agent to use your tool
Tool Not Discovered
Your server is deployed but Context can’t find your tools.Checklist
- Health endpoint returns 200:
curl https://your-server.com/health -
initializeworks: Test with curl (see above) -
tools/listreturns your tools: Test with curl after initialize - URL is HTTPS (not HTTP)
- URL ends with
/mcp(e.g.,https://your-server.com/mcp) - Tools have
outputSchemadefined (required by Context) - Every
outputSchemahastype: "object"at the root (notanyOf,oneOf, an array, or a primitive) — see outputSchema root must be object
Submission Rejected — Schema Validation Failed
If the contribute form returns a schema-validation error when you submit your endpoint, the MCP SDK rejected yourtools/list response. The most common cause is an outputSchema whose root is not { type: "object" }.
Symptoms
The form shows an error like:Schema validation failed on tool<tool_name>:outputSchema.typemust be"object"at the root.
Fix
YouroutputSchema root must be an object type. Move nullability, optionality, and error signalling inside properties — don’t express them at the root.
Validate locally before resubmitting
"outputSchemaRoot": "object". Anything else — null, "array", or missing — will be rejected.
New/Updated Tools Not Appearing
You deployed new endpoints but they’re not showing up in the marketplace. This is the most common oversight after updating your MCP server.Solution
- Go to ctxprotocol.com/developer/tools → Developer Tools (My Tools)
- Find your tool and click “Refresh Skills”
- Context will re-call
listTools()to discover your changes
Also Consider
- Update your description: if you added significant new functionality, use the MCP Server Analysis Prompt to generate an updated description
- Verify deployment: make sure your new code is actually deployed (check health endpoint, test
tools/listvia curl)
Server Won’t Start
Node.js Version
Missing Dependencies
TypeScript Errors
Module System Mismatch
Ensure yourpackage.json has:
Railway Deployment Fails
- Check Railway logs for specific errors
- Ensure
package.jsonhas"type": "module" - Set start command to:
pnpm startornpm start - Verify
tsconfig.jsonhas correct module settings
Response Schema Validation Fails
If your tool responses don’t match youroutputSchema, users can dispute them.
Common Causes
Solution
- Ensure all
structuredContentfields match youroutputSchematypes exactly - Use TypeScript to catch type mismatches at compile time
- Test your responses against the schema before deploying
MCP Security Model Reference
Understanding which methods require authentication:Discovery methods are intentionally open so AI agents can find your tools. Only execution (
tools/call) requires payment verification through the Context Platform JWT.Using Developer Mode for Debugging
When your tool is registered on the marketplace but not returning expected results, Developer Mode provides detailed execution logs to help diagnose issues.Enabling Developer Mode
- Go to Settings in the Context app
- Scroll to Developer Settings
- Enable Developer Mode
What Developer Mode Shows
When enabled, a Developer Logs card appears at the bottom of AI responses. Click to expand and see:- User’s Original Question: the prompt that triggered the turn
- Execution Summary: orchestration mode (
manual/auto/query), success status, tool-loop step count, total MCP calls, and any handshake pause or bounded-answer notice - Orchestration Selection: which policy the runtime used, the candidate method count, and the tools/methods it selected (manual pin collapses discovery, so this section is shorter for manual turns)
- Execution Contract: the planner query the iterative loop was working from
- Execution Diagnostics (tool registry): available vs. selected method counts, methods the planner picked that were filtered out at registry build, tool-call attempt/success/failure counts, and failure samples — the most actionable section for “why did my tool fail?”
- Tool Call History: every MCP call (and every Python
code_interpretersandbox call, flagged) with arguments and a truncated result - Execution Trace: the iterative loop’s per-step record (tool name, intent, output alias, duration, artifacts emitted)
- Verification: completeness evaluations, repair events, capability-miss signals, and bounded-answer reasons when the runtime stopped before another retry
- Handshake (action tools only): confirms the loop paused for your signature/approval rather than failing
- Code Interpreter Artifacts (sandbox turns only): image artifacts the Python sandbox emitted, with Vercel Blob URLs
- Final Execution Result: the data or error the runtime returned
The runtime is an iterative AI SDK tool loop — it does not generate or execute JavaScript. Older docs referenced “Initial Execution Snapshot” / “Final Execution Snapshot” blocks; those sections have been removed because the iterative runtime uses a
// iterative execution: no generated code sentinel and there is no generated code to snapshot. What you see instead is the Tool Call History and Execution Trace above.Copying Logs for Debugging
Click “Copy All” to copy the complete debug log. You can then:- Paste the logs into an AI coding assistant (Claude, GPT-4, etc.)
- Ask it to analyze why your MCP server isn’t returning expected results
- The AI can suggest specific fixes based on the execution trace
Common Issues Found via Developer Logs
Input Schema Problems
Input Schema Problems
Symptom: Wrong or missing arguments in tool callsCheck: Look at the “Tool Call History” section to see what arguments were passedFix: Ensure your
inputSchema has:- Clear
descriptionfields for each parameter defaultorexamplesvalues for better AI understanding- Correct
typedefinitions (string, number, boolean, etc.)
Output Schema Mismatches
Output Schema Mismatches
Symptom: The Execution Diagnostics section shows tool-call failures, or the Verification section reports the answer is still missing required data.Check: Compare your
outputSchema with the actual result in “Tool Call History” — does the structuredContent you return match the schema you declared?Fix: Your structuredContent must exactly match your declared outputSchema:Missing structuredContent
Missing structuredContent
Symptom: AI can’t parse your response, retries multiple timesCheck: Look at the raw result in “Tool Call History”, is it structured data or just text?Fix: Always return
structuredContent with your tool results:Poor Tool Descriptions
Poor Tool Descriptions
Symptom: AI picks the wrong tool or passes incorrect argumentsCheck: Review the Orchestration Selection and Tool Call History sections — did the runtime select your tool, and did it call your method with the arguments you expected?Fix: Write clear, specific tool descriptions:
Error Handling Issues
Error Handling Issues
Symptom: Generic errors in execution trace, no useful error messagesCheck: Look at the “error” field in failed attemptsFix: Return meaningful errors that help diagnose the issue:
Recovery and Retries
The iterative runtime automatically retries when:- Tool-call / data-shape failures: a managed MCP call returns a shape that does not match your
outputSchema, or your tool returns a structured error the runtime can recover from. - Capability miss: no available tool can satisfy the request — the Verification section will show
Needs Different Tools Triggered: YESand aMissing Capability. - Bounded answer: a safety guardrail (same-endpoint fanout, upstream abort, or explicit empty result) stops further retries and the runtime delivers the best answer from evidence already retrieved. The Verification section shows the
Bounded Answer Reason.
- Your tool returned unexpected data format (check the Tool Call History result vs your
outputSchema) - Your tool returned zero results without an explicit
searchExhausted/noResultsReasonsignal, so the runtime could not tell whether the absence was the answer - There may be schema or description improvements you can make (see the Output Schema Mismatches accordion above)
Full automated QA: For systematic validation beyond manual debugging, use the Deep Validation System Prompt. Give it to any coding agent and it will validate your server against the Context Protocol docs, test Query mode and Execute mode through the SDK with developer traces, and iterate fixes until both answer quality and runtime health pass.
Still Stuck?
GitHub Issues
Report bugs or ask questions
Example Servers
Working reference implementations

