• LOGS
  • PAYLOAD
  • FIX
  • HUMAN

How to debug LLM API errors with your AI

Connect Keywords AI to your editor once. From then on, your agent handles the heavy lifting of hunting down failed requests and inspecting payloads.

Ask AI about this page

Short answer

How can I debug LLM API errors without leaving my editor?

Your agent uses Keywords AI to fetch recent request logs and pull the full details of specific failed calls. You get a direct breakdown of why a request failed without switching tabs to a dashboard. This allows you to fix prompt issues or payload mismatches immediately.

Where every issue lands.

Debug outcomes

The agent sorts your investigation into these specific areas.

LOGS

Identify failed calls

The agent uses list_requests to find the exact timestamps and IDs of errors. You get a clean list of what went wrong.

PAYLOAD

Inspect request details

The agent pulls the specific input and output via get_request. You see exactly what the model received and sent.

FIX

Identify root causes

The agent compares the error message against the payload. It points out if the issue is a malformed JSON or a model timeout.

HUMAN

Manual code changes

The agent identifies the error, but you must apply the fix to your local codebase. It won't touch your source files.

The workflow

What your AI does when an error occurs.

Instead of you digging through logs, your agent performs the investigation.

  1. Find the error

    The agent scans your recent history to locate the specific failed calls you're asking about.

    list_requests
  2. Pull the data

    Once it finds the right ID, the agent grabs the full request and response body.

    get_request
  3. Analyze the failure

    The agent looks at the status codes and error strings to determine if the API rejected the prompt or timed out.

    get_request
  4. Suggest a fix

    The agent provides a plain English explanation of the error and suggests how to adjust your prompt or parameters.

    list_requestsget_request

Try it

Copy these to start.

Use these prompts to kick off an investigation.

Starting points

These are opening lines. Swap out the specific error types or timeframes to match your current situation.

Keywords AI Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_R4VkEIrwLVvP7dLw0Fdy9vfjO7WqxWYeI2hDwlBU/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Keywords AI capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "keywords-ai-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_R4VkEIrwLVvP7dLw0Fdy9vfjO7WqxWYeI2hDwlBU/mcp"
    }
  }
}
Copy into chat04
  • List my last 10 requests from Keywords AI and tell me which ones failed.

  • Get the details for the request with ID req_12345 and explain the error.

  • Look at my recent failed requests and tell me if there is a pattern in the error messages.

  • Check the most recent request to the completion endpoint and tell me why it returned a 400 error.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Keywords AI once, then ask.

Just click the link to connect your account. Your credentials stay encrypted and secure. Once connected, your agent can immediately start pulling logs.

Connect Keywords AI to your AI

FAQ

How this task behaves

  • 01

    Can the AI fix my code automatically?

    No. The agent can identify the error and suggest a fix, but you have to make the actual changes in your editor.

  • 02

    Can the AI delete old logs?

    No. The tools only allow the agent to list and get request data. It cannot delete or modify anything in Keywords AI.

  • 03

    How does the agent find the right error?

    It uses the list_requests tool to scan your history and then uses get_request to pull the specific data for the error it finds.

  • 04

    Does this work with any LLM?

    It works with any MCP-compatible client like Claude, Cursor, or Windsurf, regardless of which model you are running.

  • 05

    Can the agent see my API keys?

    No. The agent only sees the request and response data provided by the tools. It does not have access to your secret keys.

  • More questions about Keywords AI? The Connector page answers them. See everything the Keywords AI Connector can do

Connect Keywords AI to Claude, Cursor, ChatGPT & more