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:
ColumnDescription
TypeColor-coded level indicator (info, warn, error)
ToolThe tool name that failed
Error MessageTruncated error description extracted from the context
SubdomainWhich server the error occurred on
TimeWhen the error happened

Log level colours

LevelIndicatorWhen it’s used
infoBlue dotInformational logs
warnYellow dotWarnings — tool completed but with issues
errorRed dotFailures — tool threw or was rejected

Filters

Four independent filters plus a date range:
FilterOptions
ServerFilter by subdomain
ToolFilter by tool name (cascades based on server)
Typeinfo, warn, or error
Date RangeCalendar date picker with start and end dates

Error detail

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

Left column — Metadata

FieldDescription
LevelColor-coded type chip (info/warn/error)
ToolThe tool that produced the error
SubdomainThe server’s subdomain
CreatedFull timestamp of the error

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:
Error: GitHub API returned 401: Bad credentials
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:
{
  "owner": "example",
  "repo": "private-repo"
}
Stack trace — The full call stack at the point of failure (when available):
Error: GitHub API returned 401: Bad credentials
    at tool.js:12:9
    at async MCPCore.executeTool (runtime.js:84:5)

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

TypeCauseWhat to check
Tool errorYour code threw an uncaught exceptionCheck the stack trace and tool code
TimeoutTool execution exceeded 10 secondsIdentify the slow step with console.time()
Parameter validation errorThe AI passed invalid or missing required parametersReview parameter definitions
Authentication errorWrong API key, expired token, or missing credentialsVerify secret values
Sandbox errorAn internal error in the MCPCore execution environmentContact support if persistent

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:
const body = res.body();
if (res.status() !== 200) {
  console.error("Non-200 response:", res.status(), body);
  throw new Error(`API error ${res.status()}: ${body.slice(0, 200)}`);
}
const data = JSON.parse(body);

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.