Skip to main content

What are Error Logs?

Error Logs are a dedicated view for diagnosing tool failures. Each error entry includes the full error message, stack trace, the tool code that was running, the input parameters that triggered the error, and console output before the failure. A request is classified as an error when your tool code throws an uncaught exception, or when MCPCore rejects the request before your code runs (e.g. invalid parameters, authentication failure, timeout). Access Error Logs from Observability → Error Logs in the sidebar.

The log list

Each row in the error list shows:

Log level colours


Filters

Four independent filters plus a date range:

Error detail

Click any error row to open the full detail modal. The detail view is split into two columns:

Left column — Metadata

Right column — Diagnostic data

Four expandable sections with all the information needed to reproduce and fix the error: Error context — The primary error information. MCPCore extracts the error message intelligently — parsing JSON responses when available, falling back to raw text:
Tool code — The complete JavaScript source code of the tool that was running when the error occurred. This lets you correlate the stack trace line numbers with your actual code. Parameters — The exact params payload that caused the error. Copy these values into the Run panel to reproduce the issue:
Stack trace — The full call stack at the point of failure (when available):

AI-assisted debugging

Each error detail modal includes two AI helper buttons that pre-fill an AI assistant with the full error context:

Ask Claude

Opens Claude with a pre-built prompt that includes:
  • The platform context (MCPCore)
  • Tool name and subdomain
  • Error type and message
  • The complete tool code
  • Input parameters that caused the error
  • Stack trace (if available)

Ask ChatGPT

Opens ChatGPT with the same pre-built error context. Both buttons construct a detailed prompt so the AI has everything needed to diagnose the issue — you don’t need to copy-paste error details manually.

Error types


Common errors and fixes

env.MY_KEY is undefined

Your code references a secret that doesn’t exist on this server. Fix: Go to the Secrets tab, check that the secret exists with exactly the name used in code (case-sensitive), and add it if missing.

HTTP 401 / 403 from external API

Your credentials are wrong, expired, or don’t have permission for the requested resource. Fix: Verify the secret value in the dashboard (you can delete and re-add it with the correct value), and check the permission scopes for the API key in the external service’s settings.

JSON.parse(): Unexpected token

Your code called JSON.parse() on a non-JSON response body. Fix: Add a status check before parsing:

Timeout (10s exceeded)

The tool took longer than 10 seconds to complete. Fix: Identify the slow step using console.time() / console.timeEnd(). Common causes:
  • Database query without an index on the filter column
  • External API with high latency
  • Large result set — add LIMIT to SQL queries or paginate

Parameter validation error

The AI passed invalid input — wrong type, missing required field, or value outside expected range. Fix: Review your parameter definitions and strengthen the descriptions so the AI knows exactly what to pass. For optional parameters, set sensible default values.

Setting up alerts

Error rate alerts via email and webhook are coming soon. Until then, monitor the Error Logs page or use the Analytics error rate chart.