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 — 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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
factsYes
categoryYes
warningsYes
hypothesesYes
kb_versionYes
bean_contextYes
one_variable_onlyYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 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"
      +}
  2. 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"
      -]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description adds valuable behavioral detail: no verdict is produced, no recommendation-trail entry is written, the logged shot's own bean and age at pulled_at are used, and shot_id mode ignores metric parameters. These are meaningful specifics that the annotations alone do not provide.

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?

The description is front-loaded with the most important constraint ('Sandbox-only diagnosis, writes nothing') and organizes the two modes efficiently. Every clause adds useful detail, and the length is appropriate for a tool with 10 parameters and multiple usage modes.

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?

For a 10-parameter tool with an output schema and safe annotations, the description covers side effects, mode selection, parameter interactions, and output-shape expectations. An agent has enough information to select the correct parameters and understand the result without needing additional clarification.

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

Parameters5/5

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

Although schema coverage is 100%, the description adds critical parameter-interaction semantics: shot_id is a dry-run mode that ignores the metric fields, while the full metric set defines a hypothetical shot. It also clarifies sensory_tags override behavior, which goes well beyond the baseline for a well-covered schema.

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 opens with 'Sandbox-only diagnosis' and specifies two concrete modes: dry-run a logged shot or evaluate a hypothetical shot from a full metric set. This clearly distinguishes the tool from diagnose_shot by emphasizing that it writes nothing while returning the same output shape.

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?

The description gives explicit guidance for when to use shot_id versus the full metric set, and explains the optional sensory_tags override. It does not explicitly say 'use diagnose_shot when you want a real, persistent diagnosis,' but the sandbox-only, writes-nothing framing makes the intended context reasonably clear.

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.

TDQS

B3.4/5.0
Disambiguation4/5

Most tools target a clearly distinct resource and action, and the list/register/update/set tool families are easy to tell apart. The closest pair is diagnose_preview and diagnose_shot, which are well-described but similar enough in name that an agent could select the wrong one.

Naming Consistency4/5

The overwhelming majority of tools follow a consistent verb_noun pattern (list_beans, register_grinder, update_shot, set_active). Minor exceptions like grinder_math and kb_changelog lack the imperative verb prefix, but they are readable and do not create real confusion.

Tool Count2/5

34 tools is above the 25+ threshold and feels heavy even though the domain is fairly rich. The many parallel list_* and register_* tools for beans, grinders, machines, scales, waters, programs, and recipes could plausibly be consolidated or trimmed without losing core capability.

Completeness3/5

The core shot lifecycle is well covered: log, update, delete, diagnose, and list shots, plus bean registration and maintenance tracking. However, most registered entities lack update/delete tools, and get_rule has no corresponding list_rules tool, leaving some obvious workflow gaps that agents must work around.

Resources