Skip to main content
Glama

Neurarch

Diagnose a CUDA OOM

diagnose_oom
Read-onlyIdempotent

Call after a CUDA OOM, before changing batch size: the one cause (too big, fragmented, another process, undeclared memory) and fixes, least invasive first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "error": "<error>"
    },
    "name": "diagnose_oom"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepNo
batchNo
errorYesThe OOM text as printed.
hf_idNo
seq_lenNoThe prompt, if inference.
attentionNo
inferenceNoGeneration, not training.
gen_tokensNoDefault 256.
model_pathNoFile, zoo:<id>, hf:<org/name>
model_sourceNoOptional: answer about model text passed inline (a .neurarch.json document or PyTorch source).

Output Schema

NameRequiredDescriptionDefault
causeYes
fixesYes
summaryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish that this is a safe, read-only, idempotent, non-destructive operation, so the description does not need to restate safety. It adds meaningful output behavior beyond the annotations: the diagnosis resolves to one cause from a fixed set and returns fixes ordered least invasive first, which tells the agent how to act on the result.

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

Conciseness5/5

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

It is a single compact sentence with the trigger condition front-loaded, followed by the output shape and fix ordering. Every clause carries information and nothing is redundant.

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

Completeness3/5

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

The presence of an output schema and rich annotations means the description need not explain return values or safety, and it covers the diagnostic outcome well. However, for a 10-parameter tool it says nothing about the optional inputs or what error text formats are acceptable, leaving gaps an agent must resolve from the schema alone.

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

Parameters2/5

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

With 10 parameters and only 60% schema description coverage, several inputs such as step, batch, hf_id, and attention are undocumented in both the schema and the description. The description provides no parameter-level meaning at all, so it does not compensate for the roughly 40% coverage gap.

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

Purpose4/5

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

The description names a specific verb-and-resource pair (diagnose a CUDA OOM) and states exactly what the tool produces: the single root cause among four named categories plus ordered fixes. It does not explicitly distinguish itself from any sibling, but the scope is unambiguous enough that an agent can identify the tool's role without opening the schema.

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

Usage Guidelines4/5

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

It gives clear timing guidance: call after a CUDA OOM and before changing batch size, which implicitly discourages trial-and-error tuning. It does not name an alternative tool or state when not to use it, so it falls short of explicit alternative routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.