Skip to main content
Glama

differential_diagnosis

Read-onlyIdempotent

Retrieve corpus Patterns whose text resembles the observed behaviours, ranked by retrieval relevance (text similarity, not diagnostic probability). Returns candidates with matched_in and matched_aliases for transparency; it does not judge whether the observations are sufficient to apply any Pattern. The base package uses field-weighted keyword search; the optional embeddings extra adds cosine re-ranking.

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": {
      "observations": "<observations>"
    },
    "name": "differential_diagnosis"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
observationsYesObserved behaviours, symptoms, or log patterns.
modality_hintNoOptional hint about which modality the observations come from.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / observations / items / pattern
      Previous value: -"\\S"New value: +"^[\\s\\S]*\\S[\\s\\S]*$"
  2. Changed9 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / limit / maximum
      Added value: +20
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • addedInput schema / properties / modality_hint / maxLength
      Added value: +100
    • addedInput schema / properties / observations / items / maxLength
      Added value: +2000
    • addedInput schema / properties / observations / items / minLength
      Added value: +1
    • addedInput schema / properties / observations / items / pattern
      Added value: +"\\S"
    • addedInput schema / properties / observations / maxItems
      Added value: +50
    • addedInput schema / properties / observations / minItems
      Added value: +1
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds real behavior beyond them: ranking is relevance-based rather than probabilistic, results expose matched_in and matched_aliases for auditability, and ranking depends on whether the optional embeddings extra is installed (keyword vs. cosine re-ranking). That last point is an implementation-dependent output variation an agent could not learn from annotations or schema.

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?

Three sentences, front-loaded with purpose, then return semantics, then implementation caveat — each sentence contributes. Minor cost: field names are referenced before the agent knows they are output fields, and 'base package'/'embeddings extra' assume packaging knowledge.

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?

With no output schema, the description usefully names the returned fields and the ranking basis, which is the key thing an agent must know to interpret results. Remaining gaps are modest: what a 'Pattern' object contains besides the match fields, and how limit trades off against recall.

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 67%; observations and modality_hint carry schema descriptions, while limit is documented only by its constraints (default 10, max 20). The description adds no meaning to any parameter — modality_hint's vagueness ('which modality') and the effect of limit on result quality are left unaddressed, so the baseline of 3 for partial schema coverage is appropriate.

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 gives a specific verb and resource ('Retrieve corpus Patterns') plus the exact matching criterion ('whose text resembles the observed behaviours') and ranking rule ('retrieval relevance'). It also fences itself off from diagnostic semantics ('text similarity, not diagnostic probability'), so an agent can distinguish it from scoring/diagnostic siblings without reading further.

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 clearly frames the use case as text-similarity lookup and explicitly disclaims sufficiency judgement ('it does not judge whether the observations are sufficient to apply any Pattern'), which tells the agent this is a candidate-generation step rather than a verdict. It stops short of naming which sibling to use for the diagnostic decision, 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.