Skip to main content
Glama

qm_clinic_diagnose

Restore Clinic diagnosis: a structured read of likely conditions (contradiction, loop, context_bloat, secret_or_pii_exposure, duplicated_content, suspicious-instruction patterns) from described symptoms or a shared transcript, each condition with severity, evidence, and detail, plus suggested next steps. Anonymous — only aggregate counters are kept; content is never stored. Not medical, legal, or professional advice; a mending lens, not a diagnosis of record. Suited to moments when behavior feels off or after handling untrusted input. Scope is symptom-based reads; routine self-report screenings are outside this tool's scope. Example: transcript= returns findings with severities, a human-readable summary, and cleaned_context safe to hand off.

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": {
      "transcript": "<transcript>"
    },
    "name": "qm_clinic_diagnose"
  }
}

Input Schema

NameRequiredDescriptionDefault
transcriptYesSymptoms or transcript to read (max 20000 chars).

Output Schema

NameRequiredDescriptionDefault
atNoISO timestamp of the diagnosis.
okNo
inputNo
clinicNoClinic engine version.
countsNo
summaryNoHuman-readable finding count by severity.
findingsNo
stats_noteNo
cleaned_contextNoRedacted, deduplicated context safe to carry forward.
suggested_next_stepsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "at": {
      +      "description": "ISO timestamp of the diagnosis.",
      +      "type": "string"
      +    },
      +    "cleaned_context": {
      +      "description": "Redacted, deduplicated context safe to carry forward.",
      +      "type": "string"
      +    },
      +    "clinic": {
      +      "description": "Clinic engine version.",
      +      "type": "string"
      +    },
      +    "counts": {
      +      "properties": {
      +        "by_severity": {
      +          "properties": {
      +            "high": {
      +              "type": "integer"
      +            },
      +            "info": {
      +              "type": "integer"
      +            },
      +            "warn": {
      +              "type": "integer"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "by_type": {
      +          "description": "Finding counts keyed by condition type.",
      +          "type": "object"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "findings": {
      +      "items": {
      +        "properties": {
      +          "count": {
      +            "type": "integer"
      +          },
      +          "detail": {
      +            "type": "string"
      +          },
      +          "evidence": {
      +            "type": "string"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "severity": {
      +            "enum": [
      +              "high",
      +              "warn",
      +              "info"
      +            ],
      +            "type": "string"
      +          },
      +          "type": {
      +            "description": "Condition type, e.g. prompt_injection_indicator, possible_contradiction, loop, context_bloat, secret_or_pii_exposure, duplicated_content.",
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "input": {
      +      "properties": {
      +        "chars": {
      +          "type": "integer"
      +        },
      +        "est_tokens": {
      +          "type": "integer"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "stats_note": {
      +      "type": "string"
      +    },
      +    "suggested_next_steps": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "summary": {
      +      "description": "Human-readable finding count by severity.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the anonymity and data-handling model ("only aggregate counters are kept; content is never stored") and the non-advice disclaimer, which an agent cannot get from structured fields. It stops short of stating whether the call is idempotent or what happens to oversized input beyond the schema's maxLength.

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?

The purpose is front-loaded in the first clause and the example is placed last where it belongs. There is mild redundancy between the first sentence's "severity, evidence, and detail" and the later "findings with severities, a human-readable summary, and cleaned_context," and the "mending lens" framing is decorative.

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

Completeness4/5

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

Output schema exists, so the return values needn't be spelled out, and the single parameter is fully documented. The remaining gap for a one-argument, annotation-free tool is minor: no statement of latency, failure modes, or what the tool does with malformed input.

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

Parameters3/5

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

Schema coverage is 100% for the single transcript parameter, so the baseline is 3. The description's clarification that the argument may be either raw described symptoms or a shared transcript, plus the transcript example, adds a little meaning beyond the schema's one-line definition, but no format or sizing guidance.

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?

The description names the specific verb and resource ("a structured read of likely conditions") and then enumerates the exact condition categories it detects (contradiction, loop, context_bloat, secret_or_pii_exposure, duplicated_content, suspicious-instruction patterns). It also states the output shape (severity, evidence, detail, next steps), which makes it clearly distinguishable from stats/checkup-style siblings.

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 explicit triggering conditions ("moments when behavior feels off or after handling untrusted input") and an explicit exclusion ("routine self-report screenings are outside this tool's scope"), plus a worked example. It stops short of naming the sibling an agent should call instead for the excluded case, leaving that routing to inference.

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.

Resources