Skip to main content
Glama

Preview a diagnosis

diagnose_preview
Read-onlyIdempotent

Sandbox-only diagnosis, writes nothing (no verdict, no recommendation-trail entry). Two modes: pass shot_id to dry-run a LOGGED shot (optionally overriding its sensory_tags, for the "what would this read as?" preview; the shot's own bean and its age at pulled_at are used), or pass the full metric set (bean_id, grinder_id, machine_id, grind_label, dose_g, yield_g, time_s, source) for a hypothetical shot. Identical output shape to diagnose_shot, including bean_context.

Input Schema

NameRequiredDescriptionDefault
dose_gNoDose in grams
sourceNoGrinder position source. Affects G1 warning (raw mode only)
time_sNoExtraction time in seconds
bean_idNoCoffee bean ID (must belong to this account)
shot_idNoPreview a logged shot by ID (dry-run; ignores the metric params below)
yield_gNoYield in grams
grinder_idNoGrinder ID (must belong to this account)
machine_idNoMachine ID (must belong to this account)
grind_labelNoGrinder setting label, e.g. "1.1.3"
sensory_tagsNoSensory observations, e.g. ["sour","bitter"]. With shot_id: replaces the stored tags for this preview (omit to use stored; [] = none).

Output Schema

NameRequiredDescriptionDefault
factsYes
categoryYes
warningsYes
hypothesesYes
kb_versionYes
bean_contextYes
warning_codesYes
one_variable_onlyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / source / description
      Previous value: -"Grinder position source — affects G1 warning (raw mode only)"New value: +"Grinder position source. Affects G1 warning (raw mode only)"
    • addedOutput schema / properties / warning_codes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "category",
      -  "facts",
      -  "hypotheses",
      -  "warnings",
      -  "one_variable_only",
      -  "kb_version",
      -  "bean_context"
      -]New value: +[
      +  "category",
      +  "facts",
      +  "hypotheses",
      +  "warnings",
      +  "one_variable_only",
      +  "kb_version",
      +  "warning_codes",
      +  "bean_context"
      +]
  2. Changed2 schema fields changed
    • addedOutput schema / properties / bean_context / properties / bag_id
      Added value: +{
      +  "type": "integer"
      +}
    • changedOutput schema / properties / bean_context / required
      Previous value: -[
      -  "bean_id",
      -  "bean_name",
      -  "roast_level",
      -  "effective_age_days",
      -  "dial_category"
      -]New value: +[
      +  "bean_id",
      +  "bag_id",
      +  "bean_name",
      +  "roast_level",
      +  "effective_age_days",
      +  "dial_category"
      +]
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "bean_context": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "bean_id": {
      +          "type": "integer"
      +        },
      +        "bean_name": {
      +          "type": "string"
      +        },
      +        "dial_category": {
      +          "type": "string"
      +        },
      +        "effective_age_days": {
      +          "type": "integer"
      +        },
      +        "roast_level": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "bean_id",
      +        "bean_name",
      +        "roast_level",
      +        "effective_age_days",
      +        "dial_category"
      +      ],
      +      "type": "object"
      +    },
      +    "category": {
      +      "type": "string"
      +    },
      +    "facts": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "source": {
      +            "type": "string"
      +          },
      +          "text": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "text",
      +          "source"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "hypotheses": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "cause": {
      +            "type": "string"
      +          },
      +          "cited_rules": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "confidence": {
      +            "type": "string"
      +          },
      +          "direction": {
      +            "type": "string"
      +          },
      +          "experiment": {
      +            "type": "string"
      +          },
      +          "lever": {
      +            "type": "string"
      +          },
      +          "target_label": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "cause",
      +          "lever",
      +          "direction",
      +          "confidence",
      +          "experiment",
      +          "cited_rules"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "kb_version": {
      +      "type": "string"
      +    },
      +    "one_variable_only": {
      +      "type": "boolean"
      +    },
      +    "warnings": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "category",
      +    "facts",
      +    "hypotheses",
      +    "warnings",
      +    "one_variable_only",
      +    "kb_version",
      +    "bean_context"
      +  ],
      +  "type": "object"
      +}
  4. Changed4 schema fields changed
    • changedInput schema / properties / sensory_tags / description
      Previous value: -"Sensory observations, e.g. [\"sour\",\"bitter\"]"New value: +"Sensory observations, e.g. [\"sour\",\"bitter\"]. With shot_id: replaces the stored tags for this preview (omit to use stored; [] = none)."
    • addedInput schema / properties / shot_id
      Added value: +{
      +  "description": "Preview a logged shot by ID (dry-run; ignores the metric params below)",
      +  "type": "integer"
      +}
    • changedInput schema / properties / source / description
      Previous value: -"Grinder position source — affects G1 warning"New value: +"Grinder position source — affects G1 warning (raw mode only)"
    • removedInput schema / required
      Removed value: -[
      -  "bean_id",
      -  "grinder_id",
      -  "machine_id",
      -  "grind_label",
      -  "dose_g",
      -  "yield_g",
      -  "time_s",
      -  "source"
      -]
  5. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, and the description adds real value on top: it names exactly what is not produced (no verdict, no recommendation-trail entry), clarifies which bean and which age snapshot are used in shot_id mode, and defines the sensory_tags override semantics including the empty-array case.

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 key fact (writes nothing), then the two modes in dependency order. Dense and mostly earned, though the single long parenthetical sentence could be split for scanability.

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?

An output schema exists, so return values need no explanation, yet the description still points at parity with diagnose_shot including bean_context. Mode selection, side-effect profile, and parameter grouping are all covered for a 10-parameter, all-optional tool.

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 a 3 is the floor, but the description earns more: with zero required parameters declared, saying that the hypothetical mode needs the full metric set (bean_id, grinder_id, machine_id, grind_label, dose_g, yield_g, time_s, source) tells the agent which subset to supply. It adds no format or unit detail beyond the schema, which is fine given full coverage.

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 (sandbox-only diagnosis preview) and immediately names its sibling diagnose_shot as the output-equivalent, so the agent can triangulate its role without opening another schema. The two operating modes are named concretely.

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?

Explicitly explains the two invocation paths and their conditions: shot_id to dry-run a logged shot, or the full metric set for a hypothetical shot. It stops short of an explicit when-not statement (e.g. 'use diagnose_shot to actually record a verdict'), leaving that contrast implied by naming the sibling.

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