Skip to main content
Glama

ShotPulled

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "diagnose_preview"
  }
}

Input Schema

NameRequiredDescriptionDefault
dose_gNoDose in grams
ratingNoStars 1 to 5, as tapped and not yet saved. With shot_id: replaces the stored rating for this preview (omit to use stored; 0 = unrated).
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. Changed1 schema field changed
    • addedInput schema / properties / rating
      Added value: +{
      +  "description": "Stars 1 to 5, as tapped and not yet saved. With shot_id: replaces the stored rating for this preview (omit to use stored; 0 = unrated).",
      +  "type": "integer"
      +}
  2. 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"
      +]
  3. 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"
      +]
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds concrete value on top: it enumerates what is *not* produced (no verdict, no recommendation-trail entry) and specifies the override semantics for sensory_tags and rating. It does not state whether the preview is rate-limited or what happens if neither mode's inputs are supplied, so it falls just short of full disclosure.

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-loads the two most decision-relevant facts (sandbox, writes nothing) before the mode breakdown, and every clause carries information. The nested parentheticals for the override cases make it denser than ideal to scan, but nothing is redundant.

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 an output schema present, the description correctly spends its budget on inputs and side effects rather than return values, and it notes the shared output shape including bean_context. The one gap is that all 11 parameters are optional, yet it never says what happens when neither a shot_id nor a complete metric set is supplied.

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 the baseline is 3; the description earns above that by explaining cross-parameter behavior the schema cannot — that shot_id suppresses the metric params, that the shot's own bean and its age at pulled_at are used, and that sensory_tags/rating override stored values in preview only.

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') plus the negative scope ('writes nothing') and names the two invocation modes. It also anchors itself against the sibling diagnose_shot by promising an identical output shape, so an agent can tell the two apart without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit mode-selection rules: pass shot_id to dry-run a logged shot, or pass the full metric set for a hypothetical shot. It also names the counterpart tool (diagnose_shot) implicitly through the 'no verdict, no recommendation-trail entry' framing, which tells the agent when the real, persisting diagnosis is wanted instead.

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