Skip to main content
Glama

Search MeSH descriptors

search_mesh_descriptor
Read-only

Find MeSH descriptors by case-insensitive substring match in their labels through the NLM MeSH lookup API, returning descriptor IRIs and labels for matching biomedical terms.

Instructions

Find MeSH descriptors whose label contains the query, via the NLM MeSH lookup API (https://id.nlm.nih.gov/mesh/lookup/descriptor). Matching is a case-insensitive substring match on the descriptor label, so "asthma" also returns "Anti-Asthmatic Agents".

RETURNS a JSON array string of {"resource": <MeSH descriptor IRI>, "label": <descriptor name>} objects (at most limit); the descriptor ID (e.g. D001249) is the IRI's last path segment. On upstream/HTTP failure this tool does NOT raise — it returns a plain string beginning with "Error:" (not JSON). check for the "Error:" prefix before parsing.

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": "search_mesh_descriptor"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
termNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
limitNoThe maximum number of results to return. Default is 10.
queryNoThe query string to search for. Accepts aliases: `search`, `term`, `keyword`, `keywords`, `search_term`, `name`.
searchNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
keywordNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
keywordsNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.
search_termNoAlias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.34.1
    • addedInput schema / properties / keyword / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / keywords / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / name / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / search / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / search_term / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
    • addedInput schema / properties / term / description
      Added value: +"Alias for `query` — pass ONE of query/search/term/keyword/keywords/search_term/name. Supplying two with different values raises ValueError."
  2. Changed2 schema fields changedv2.0.0
    • addedInput schema / properties / limit / description
      Added value: +"The maximum number of results to return. Default is 10."
    • addedInput schema / properties / query / description
      Added value: +"The query string to search for. Accepts aliases:\n`search`, `term`, `keyword`, `keywords`, `search_term`, `name`."
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations: it documents the return shape, the at-most-`limit` cap, how to derive D001249 from the IRI segment, and critically that upstream/HTTP failures return a plain "Error:"-prefixed string instead of raising. That error contract is exactly the kind of disclosure annotations cannot carry and prevents a parsing failure.

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?

Front-loaded with purpose, then return contract, then the error-handling caveat — the three things a caller needs in priority order. No filler sentences; the parenthetical HTTP example and the inline example query both earn their space by removing ambiguity.

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?

Despite an output schema existing, the description still supplies the non-obvious pieces: the IRI-to-descriptor-ID derivation and the non-JSON error path. Combined with the alias-conflict rule already in the schema, an agent has everything needed to call and parse results safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and each of the eight alias parameters is already documented in-schema, including the ValueError on conflicting aliases. The description only echoes `limit` and `query` behavior, adding no new parameter meaning, so the baseline of 3 applies.

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 ("Find MeSH descriptors whose label contains the query") and pins down the exact upstream endpoint and matching rule. It also disambiguates semantics the caller would otherwise assume wrong, e.g. that "asthma" also returns "Anti-Asthmatic Agents", which separates it from exact-lookup siblings.

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 substring-matching caveat with a concrete example tells the agent when this tool's recall behavior is appropriate, and the pointer to the NLM lookup API establishes context. It does not name a when-not case or an alternative tool (e.g. ID-based lookups via togoid_identifyId) for exact resolution, so it stops short of explicit routing.

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