Skip to main content
Glama
health-os

health-os

map_pending_observation

Assign a marker type (observation_types.code, e.g. "lymphocytes_abs") to a pending row that is unmapped or matched to the wrong marker — only after the user confirmed which marker it is.

Instructions

Assign a marker type (observation_types.code, e.g. "lymphocytes_abs") to a pending row that is unmapped or matched to the wrong marker — only after the user confirmed which marker it is. Re-normalizes the value into the canonical unit, re-runs the critical-value check and (learn_synonym) remembers the printed name so future panels map it automatically. Refuses a type whose unit dimension doesn't fit. The row stays PENDING; approve separately.

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": {
      "observation_id": "<observation_id>",
      "type_code": "<type_code>"
    },
    "name": "map_pending_observation"
  }
}

Input Schema

NameRequiredDescriptionDefault
type_codeYes
learn_synonymNo
observation_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the value is re-normalized into the canonical unit, that the critical-value check is re-run, that learn_synonym persists the printed name for future automatic mapping, and that a unit-dimension mismatch causes refusal. These side effects explain the non-idempotent, non-read-only profile declared in annotations.

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 verb and resource, and each clause adds real information (precondition, normalization, critical check, synonym learning, refusal, PENDING state). Dense but almost no waste; the parenthetical example could be tightened slightly.

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 mutating, open-world tool with an output schema, the description covers precondition, side effects, failure mode, and the post-state of the row. Nothing an agent needs to call it correctly is missing, and return values are covered by the output schema.

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 0%, so the description must carry the load. It explains type_code with its source table and an example ('observation_types.code, e.g. "lymphocytes_abs"') and explains what learn_synonym actually does. observation_id is left implicit, a minor gap in an otherwise strong compensation.

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?

Specific verb+resource: assigns a marker type code to a specific pending observation row that is unmapped or mis-mapped. The final clause ('The row stays PENDING; approve separately') explicitly separates this from the approval sibling, so an agent can distinguish it from approve_staged_source or list_pending_reviews.

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?

Gives a clear precondition ('only after the user confirmed which marker it is') and states the triggering condition (row unmapped or matched to the wrong marker). It also warns the row remains PENDING and approval is a separate step. It doesn't name the approval sibling by exact tool name, which keeps it just below a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.