Skip to main content
Glama

ATC Code Details

atc_lookup
Read-onlyIdempotent

Resolve an ATC code to its class name and hierarchy level, verify it exists, and determine the anatomical, therapeutic, pharmacological, or chemical level.

Instructions

Look up an ATC code at level 1-4 to get its name and hierarchy level.

Use this tool to:

  • Resolve an ATC code (e.g., "A10BA") to its class name ("Biguanides")

  • Confirm a code exists in the current ATC index

  • Identify the level (anatomical / therapeutic / pharmacological / chemical)

Accepts codes 1-5 characters long: "A" (anatomical), "A10" (therapeutic), "A10B" (pharmacological), "A10BA" (chemical). Substance-level codes (7 chars, e.g., "A10BA02") are not exposed by this endpoint — use atc_classify with the drug name to retrieve the substance code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atc_codeYesATC code at level 1-4 (1-5 chars). Substance-level codes (7 chars, e.g., A10BA02) are not exposed by this endpoint — use atc_classify with the drug name instead.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
foundYes
detailsYes
atc_codeYes
provenanceYesProvenance block (contract v1.0): source, URL, data vintage, extraction instant, citation, license
attributionYesCanonical source URLs of this response (attribution list)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.9.1
    • removedOutput schema / properties / provenance / properties / data_vintage / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / provenance / properties / data_vintage / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / provenance / properties / license / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / provenance / properties / license / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed3 schema fields changedv1.8.0
    • addedOutput schema / properties / attribution
      Added value: +{
      +  "description": "Canonical source URLs of this response (attribution list)",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / provenance
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Provenance block (contract v1.0): source, URL, data vintage, extraction instant, citation, license",
      +  "properties": {
      +    "citation": {
      +      "description": "Ready-to-use citation/attribution string",
      +      "type": "string"
      +    },
      +    "data_vintage": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Version/release of the data as exposed by the source; null when not exposed"
      +    },
      +    "license": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "License / legal regime of the data"
      +    },
      +    "retrieved_at": {
      +      "description": "Real instant of the upstream extraction (ISO-8601, UTC). Responses served from cache keep the ORIGINAL fetch instant.",
      +      "type": "string"
      +    },
      +    "source": {
      +      "description": "Official upstream source of this data",
      +      "type": "string"
      +    },
      +    "source_url": {
      +      "description": "Canonical URL of the source (API base or dataset release)",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "source",
      +    "source_url",
      +    "data_vintage",
      +    "retrieved_at",
      +    "citation",
      +    "license"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "atc_code",
      -  "found",
      -  "details"
      -]New value: +[
      +  "atc_code",
      +  "found",
      +  "details",
      +  "provenance",
      +  "attribution"
      +]
  3. Changed1 schema field changedv1.5.7
    • removedInput schema / additionalProperties
      Removed value: -false
  4. First observedv1.2.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, and non-destructive behavior. The description adds useful operational context: accepted code lengths, the fact that substance-level codes are not exposed, and the tool's function of confirming existence in the current ATC index. It does not contradict annotations, and no error-behavior detail is necessary for this simple read-only lookup.

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?

The description is front-loaded with a clear purpose, uses compact bullet points, and keeps examples short. There is slight redundancy because the substance-code caveat appears in both the description and the parameter schema, but the description remains appropriately sized and scannable.

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 single-parameter, read-only lookup with an output schema, the description is complete: it defines input format, valid levels, edge cases, what the result represents, and which sibling tool should be used for unsupported codes. No significant context is missing.

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?

The input schema already covers the parameter fully with a pattern and a note about substance-level codes. The description goes beyond the schema by mapping code lengths to hierarchy levels (A, A10, A10B, A10BA) and explaining the alternative for 7-character codes, which adds semantic meaning for the agent.

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 uses a specific verb and resource: 'Look up an ATC code at level 1-4 to get its name and hierarchy level.' It gives concrete examples (e.g., A10BA -> Biguanides) and explicitly distinguishes itself from atc_classify, making sibling differentiation clear.

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?

The description provides an explicit 'Use this tool to' bullet list and states a clear exclusion: substance-level codes (7 chars) are not exposed and should be handled by atc_classify instead. This gives the agent an explicit when-to-use and when-not-to-use condition with a named alternative.

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