Skip to main content
Glama

lookup_code

Find codes that match free text like 'metoprolol 25' from a terminology catalog. Results ranked by relevance; optionally restrict to a code system.

Instructions

Search the terminology catalog for codes matching free text (e.g. 'metoprolol 25', 'type 2 diabetes'). Call this whenever you need a code — use a returned candidate, never invent or recall one. Results are ranked tightest-match-first; optionally restrict to one code system URI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
systemNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions that results are ranked 'tightest-match-first', which is a useful behavioral trait. However, it does not disclose auth requirements, rate limits, result limits, or error handling. The description is adequate but not comprehensive.

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 extremely concise: three sentences covering purpose, usage guidance, and ranking/system restriction. Every sentence adds value with no fluff. Front-loaded with the core action.

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?

Given no output schema and no annotations, the description covers the essential points: what it does, when to use it, ranking, and optional parameter. It could be more complete by mentioning result format or what to do if no match, but it is sufficient for a simple lookup tool.

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 must compensate. It provides concrete examples for 'query' and explains the 'system' parameter as 'optionally restrict to one code system URI'. This adds meaning beyond the schema, though it does not elaborate on what a code system URI looks like.

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 clearly states the verb 'search' and the resource 'terminology catalog for codes' with examples. It distinguishes itself from inventing codes by explicitly saying 'never invent or recall one', and the sibling 'list_codes' is a different operation (listing all vs. free-text search).

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 explicitly says 'Call this whenever you need a code' and provides a caution against inventing codes. It also mentions optional system restriction. However, it does not explicitly exclude scenarios or compare with sibling tools like 'list_codes' or 'get_coded_entries', so it loses one point.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/healthchainai/HealthChain'

If you have feedback or need assistance with the MCP directory API, please join our Discord server