Skip to main content
Glama

get_observations

Read-onlyIdempotent

Fetch lab results and vital signs for a patient by LOINC code, newest first, with optional since date and result limit.

Instructions

Lab results and vital signs for one LOINC code, newest first. since (YYYY-MM-DD) is inclusive; limit is 1-100. Examples: 4548-4 HbA1c, 13457-7 LDL cholesterol, 3016-3 TSH, 8480-6 systolic and 8462-4 diastolic blood pressure.

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": {
      "patient_id": "<patient_id>",
      "loinc_code": "<loinc_code>"
    },
    "name": "get_observations"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
sinceNo
loinc_codeYes
patient_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/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), so the description's job is narrower. It usefully adds the result ordering ('newest first') and the valid range for limit, which are genuine behavior not present in the annotations. It stops short of describing what happens on an invalid LOINC code or whether results are paginated.

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?

Two compact sentences: the core behavior and ordering are front-loaded, followed by parameter constraints and a high-value example list. Nothing is redundant and the LOINC examples earn their space.

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?

For a four-parameter read tool with no output schema, the definition covers scope, ordering, and parameter constraints adequately. The main remaining gap is that the shape of returned observations (fields, units, single vs. multiple result components) is not described, which matters since no output schema exists.

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 description coverage is 0%, so the description carries the burden and does so for the two ambiguous parameters: `since` is a YYYY-MM-DD date and is inclusive, and `limit` is bounded 1-100. `patient_id` and `loinc_code` are self-explanatory by name, and the LOINC examples add practical meaning. Minor gap: the default values are only in the schema, not reinforced.

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 and resource ('Lab results and vital signs'), the scope ('for one LOINC code'), and the ordering ('newest first'). The resource is clearly distinct from the sibling set of allergies, conditions, medications, and patient lookups, so an agent can route without opening the schema.

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

Usage Guidelines3/5

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

The requirement of a single LOINC code is stated and five example codes are given, which implies usage. However, there is no guidance on what to do when the code is unknown, no mention of alternatives, and no explicit when-not-to-use condition.

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