Skip to main content
Glama

Diagnose my turns

diagnose_my_turns
Read-onlyIdempotent

Review several Ollama turns to find rejected or truncated prompts, lost prompt cache, models partly on CPU, or tool schemas crowding the prompt, and get a fix for each.

Instructions

Is anything wrong with the Ollama calls your client sent through LLMxRay on port 11435? A verdict judged over several turns: a prompt rejected or silently cut by the context, the cache lost on every turn or on one turn, a model partly on CPU, tool schemas crowding the prompt. Four tools read your turns, one question each: diagnose_my_turns, is anything wrong (a verdict over several turns); read_my_last_turn, what exactly happened on the latest turn (one turn in full); list_my_turns, what happened turn by turn (the sequence, one line each); compare_my_turns, did a change help (before against after). Call it after a few turns, and again after a change. For which model or context fits use list_local_models. Returns text. First one line per client seen, then one finding per line tagged [high], [medium] or [low], each ending with the fix. It says so when nothing stands out, and explains how to route through 11435 when no turn was seen. client: your X-LLMxRay-Client name; without it on a shared machine you read every tool's turns. since_minutes: 1 to 10080, minutes since your change. They combine. Needs LLMxRay running (npx llmxray) and says so if not. Under a second, from records already kept. No model is called.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "diagnose_my_turns"
  }
}

Input Schema

NameRequiredDescriptionDefault
clientNoPart of the client label or id as LLMxRay shows it (for example "VS Code Copilot", "python-requests", or the X-LLMxRay-Client header you sent). Case-insensitive substring. Omit for all clients.
since_minutesNoOnly turns from the last N minutes. Omit for every turn LLMxRay has kept.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.8.9
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / since_minutes / maximum
      Added value: +9007199254740991
  2. Changed2 schema fields changedv0.8.2
    • changedInput schema / properties / client / description
      Previous value: -"Part of the client label or id as LLMxRay shows it (for example \"VS Code Copilot\", \"python-requests\"). Omit for all clients."New value: +"Part of the client label or id as LLMxRay shows it (for example \"VS Code Copilot\", \"python-requests\", or the X-LLMxRay-Client header you sent). Case-insensitive substring. Omit for all clients."
    • changedInput schema / properties / since_minutes / description
      Previous value: -"Only turns from the last N minutes."New value: +"Only turns from the last N minutes. Omit for every turn LLMxRay has kept."
  3. First observedv0.8.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish read-only, idempotent, non-destructive, closed-world, so the bar is lower, yet the description adds real behavioral detail: how findings are formatted (one line per client, then tagged [high]/[medium]/[low] each ending with the fix), that it declares when nothing stands out, that it explains 11435 routing when no turn was seen, plus prerequisites, latency, and 'no model is called'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core question and no filler sentences, but the tool-comparison block and return-format block make it longer than strictly needed; each sentence still carries information an agent would otherwise have to infer.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description compensates by describing the return text shape, the empty-case behavior, and the failure/routing path when LLMxRay is not running. Nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description adds meaning beyond it by noting that client and since_minutes combine and by flagging the shared-machine consequence of omitting client (you read every tool's turns). It does not restate the substring semantics, which the schema already covers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (a verdict over several turns about Ollama calls sent through LLMxRay on port 11435) and explicitly positions itself against all four sibling turn-readers with a one-line differentiator each. An agent can pick this tool without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit timing guidance ('Call it after a few turns, and again after a change') and routes the agent to list_local_models for a different question (which model or context fits). The four-tool comparison table makes when-to-use vs alternatives unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.