Skip to main content
Glama

Search MeSH

mesh_search
Read-onlyIdempotent

Search for MeSH (Medical Subject Headings) descriptors.

Use this tool to:

  • Find MeSH terms for indexing medical literature

  • Look up subject headings for PubMed searches

  • Find controlled vocabulary terms

NLM publishes MeSH in English: the search matches and returns English labels whatever language says (a handful of records also carry other languages — 13 Portuguese labels in the whole dataset, measured 2026-11-28 — and mesh_descriptor returns those). Content is never machine-translated.

Returns matching descriptors with MeSH IDs and labels. When no descriptor LABEL matches (lay words such as "heart attack" or "bedsore"), the search falls back to MeSH entry terms and says so (matched_via: "entry_term", with the matched_term per descriptor) — that fallback takes a few seconds. Not applied with match: "exact".

No pagination: the NLM lookup returns at most 50 descriptors and has no offset. When total_count equals max_results there may be more — narrow the query or use match: "startswith" / "exact".

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": {
      "query": "<query>"
    },
    "name": "mesh_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
matchNoMatch type: exact, contains, or startswith. Default: containscontains
queryYesSearch term (e.g., "diabetes", "heart failure")
languageNoLanguage code (default: en). MeSH is published by NLM in English; another language is returned only where the NLM record carries it (rare), otherwise English. Never machine-translated.en
max_resultsNoMaximum number of results (1-100). Default: 25. The NLM lookup returns at most 50: above 50, 50 are asked for and the answer says so.

Output Schema

NameRequiredDescriptionDefault
matchYesMatch type applied to descriptor labels.
queryYesThe search term as submitted.
provenanceYesProvenance block: source, URL, data vintage, extraction instant, origin diagnostics, citation, license
attributionYesCanonical source URLs of this response (attribution list)
descriptorsYesMatching MeSH descriptors, each with its ID (e.g. "D003920"), URI and label.
matched_viaYesdescriptor_label = the query matched descriptor labels; entry_term = no label matched, so the descriptors were reached through MeSH entry terms (synonyms such as "Heart Attack" for Myocardial Infarction).
total_countYesNumber of descriptors returned. The NLM lookup stops at max_results and has no offset, so this is not a count of all matches and there is no next page: when it equals max_results, narrow the query or use `match`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / max_results / description
      Previous value: -"Maximum number of results (1-100). Default: 25"New value: +"Maximum number of results (1-100). Default: 25. The NLM lookup returns at most 50: above 50, 50 are asked for and the answer says so."
    • changedOutput schema / properties / total_count / description
      Previous value: -"Number of descriptors returned (the NLM lookup is capped at max_results, so this is not a total count of all matches)."New value: +"Number of descriptors returned. The NLM lookup stops at max_results and has no offset, so this is not a count of all matches and there is no next page: when it equals max_results, narrow the query or use `match`."
  2. Changed1 schema field changed
    • changedInput schema / properties / language / description
      Previous value: -"Language code (default: en). Returns the source's OFFICIAL translation when it exists (e.g. 'pt' for official Portuguese); content is never machine-translated."New value: +"Language code (default: en). MeSH is published by NLM in English; another language is returned only where the NLM record carries it (rare), otherwise English. Never machine-translated."
  3. Changed4 schema fields changed
    • addedOutput schema / properties / descriptors / items / properties / matched_term
      Added value: +{
      +  "description": "The MeSH entry term that led to this descriptor; null when the label itself matched.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / descriptors / items / required
      Previous value: -[
      -  "id",
      -  "uri",
      -  "label"
      -]New value: +[
      +  "id",
      +  "uri",
      +  "label",
      +  "matched_term"
      +]
    • addedOutput schema / properties / matched_via
      Added value: +{
      +  "description": "descriptor_label = the query matched descriptor labels; entry_term = no label matched, so the descriptors were reached through MeSH entry terms (synonyms such as \"Heart Attack\" for Myocardial Infarction).",
      +  "enum": [
      +    "descriptor_label",
      +    "entry_term"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "query",
      -  "match",
      -  "total_count",
      -  "descriptors",
      -  "provenance",
      -  "attribution"
      -]New value: +[
      +  "query",
      +  "match",
      +  "total_count",
      +  "matched_via",
      +  "descriptors",
      +  "provenance",
      +  "attribution"
      +]
  4. Changed4 schema fields changed
    • addedOutput schema / properties / descriptors / description
      Added value: +"Matching MeSH descriptors, each with its ID (e.g. \"D003920\"), URI and label."
    • addedOutput schema / properties / match / description
      Added value: +"Match type applied to descriptor labels."
    • addedOutput schema / properties / query / description
      Added value: +"The search term as submitted."
    • addedOutput schema / properties / total_count / description
      Added value: +"Number of descriptors returned (the NLM lookup is capped at max_results, so this is not a total count of all matches)."
  5. Changed1 schema field changed
    • changedOutput schema / properties / provenance / properties / notices / description
      Previous value: -"Notices the source publishes alongside the data (license statements, caveats), verbatim. Absent when there is none"New value: +"Caveats the source publishes about the data, verbatim (license statements are not repeated here; see the info://licenses resource). Absent when there is none"
  6. Changed7 schema fields changed
    • changedOutput schema / properties / provenance / description
      Previous value: -"Provenance block (contract v1.1): source, URL, data vintage, extraction instant, origin diagnostics, citation, license"New value: +"Provenance block: source, URL, data vintage, extraction instant, origin diagnostics, citation, license"
    • addedOutput schema / properties / provenance / properties / derivation_note
      Added value: +{
      +  "description": "What this server computed; present together with derived",
      +  "type": "string"
      +}
    • addedOutput schema / properties / provenance / properties / derived
      Added value: +{
      +  "description": "Present (true) only when this server computed the value (e.g. a ranking or summary statistics) instead of passing on what the source returned",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / provenance / properties / field_sources / description
      Previous value: -"Present only when the response joins parts from different origins or extraction instants (contract v1.2): for each group of fields, its URL, extraction instant and whether it came from cache. Absent in single-origin responses"New value: +"Present only when the response joins parts from different origins or extraction instants: for each group of fields, its URL, extraction instant and whether it came from cache. Absent in single-origin responses"
    • addedOutput schema / properties / provenance / properties / notices
      Added value: +{
      +  "description": "Notices the source publishes alongside the data (license statements, caveats), verbatim. Absent when there is none",
      +  "items": {
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedOutput schema / properties / provenance / properties / retrieval / description
      Previous value: -"Origin diagnostics of THIS source in this call (contract v1.1): requests made to the upstream, attempts summed across retries, anomalies worked around (kind + count); unstable=true when any anomaly happened. null when nothing was measured (bundled dataset, or response served entirely from cache)"New value: +"Origin diagnostics of THIS source in this call: requests made to the upstream, attempts summed across retries, anomalies worked around (kind + count); unstable=true when any anomaly happened. null when nothing was measured (bundled dataset, or response served entirely from cache)"
    • addedOutput schema / properties / provenance / properties / revision
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Whether the data can still change at the source: current = the version in force, the source may revise it; provisional = preliminary; final = will not change. Absent when unknown",
      +  "properties": {
      +    "note": {
      +      "description": "O específico da fonte: o que revisa, quando, por quê",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "description": "current = versão vigente, a fonte pode revisá-la; provisional = preliminar, incompleta ou sujeita a mudança (não compare como se fosse fechada); final = não muda mais, declarado pela fonte",
      +      "enum": [
      +        "current",
      +        "provisional",
      +        "final"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "note"
      +  ],
      +  "type": "object"
      +}
  7. Changed1 schema field changed
    • addedOutput schema / properties / provenance / properties / field_sources
      Added value: +{
      +  "description": "Present only when the response joins parts from different origins or extraction instants (contract v1.2): for each group of fields, its URL, extraction instant and whether it came from cache. Absent in single-origin responses",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Proveniência de um grupo de campos da resposta: de onde veio e quando foi extraído",
      +    "properties": {
      +      "data_vintage": {
      +        "description": "Vintage/competência da sub-fonte",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "dataset_id": {
      +        "description": "Identificador do conjunto da sub-fonte",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "fields": {
      +        "description": "Campos do payload atribuídos a esta sub-fonte",
      +        "items": {
      +          "type": "string"
      +        },
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "retrieved_at": {
      +        "description": "ISO-8601 da extração desta sub-fonte na origem",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "served_from_cache": {
      +        "description": "true se esta sub-fonte veio do cache do servidor (retrieved_at é o da extração original); false se foi buscada nesta chamada; null se o servidor não distingue",
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      },
      +      "source_url": {
      +        "description": "URL canônica da sub-fonte que originou estes campos",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "fields",
      +      "source_url",
      +      "dataset_id",
      +      "data_vintage",
      +      "retrieved_at"
      +    ],
      +    "type": "object"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
  8. Changed3 schema fields changed
    • changedOutput schema / properties / provenance / description
      Previous value: -"Provenance block (contract v1.0): source, URL, data vintage, extraction instant, citation, license"New value: +"Provenance block (contract v1.1): source, URL, data vintage, extraction instant, origin diagnostics, citation, license"
    • addedOutput schema / properties / provenance / properties / retrieval
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "anomalies": {
      +          "description": "Anomalias superadas até o sucesso, somadas por classe, em ordem fixa; [] se nenhuma",
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "count": {
      +                "description": "Ocorrências desta classe na chamada",
      +                "maximum": 9007199254740991,
      +                "minimum": 1,
      +                "type": "integer"
      +              },
      +              "kind": {
      +                "description": "Classe da anomalia (vocabulário fechado do contrato)",
      +                "enum": [
      +                  "timeout",
      +                  "network",
      +                  "http_4xx",
      +                  "http_5xx",
      +                  "rate_limited",
      +                  "malformed_body"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "count"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "attempts": {
      +          "description": "Tentativas somadas, incluindo as repetidas (>= requests)",
      +          "maximum": 9007199254740991,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "requests": {
      +          "description": "Idas distintas à origem que compõem esta resposta (fatias, páginas)",
      +          "maximum": 9007199254740991,
      +          "minimum": 1,
      +          "type": "integer"
      +        },
      +        "unstable": {
      +          "description": "true se houve repetição (attempts > requests) ou alguma anomalia",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "requests",
      +        "attempts",
      +        "anomalies",
      +        "unstable"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Origin diagnostics of THIS source in this call (contract v1.1): requests made to the upstream, attempts summed across retries, anomalies worked around (kind + count); unstable=true when any anomaly happened. null when nothing was measured (bundled dataset, or response served entirely from cache)"
      +}
    • changedOutput schema / properties / provenance / required
      Previous value: -[
      -  "source",
      -  "source_url",
      -  "data_vintage",
      -  "retrieved_at",
      -  "citation",
      -  "license"
      -]New value: +[
      +  "source",
      +  "source_url",
      +  "data_vintage",
      +  "retrieved_at",
      +  "retrieval",
      +  "citation",
      +  "license"
      +]
  9. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  10. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, open-world, non-destructive, yet the description still adds substantial behavior: the English-only matching rule, the entry-term fallback with its matched_via/matched_term signals and multi-second latency, the fact that exact match suppresses the fallback, and the hard 50-descriptor ceiling. It even warns that total_count == max_results is an unreliable truncation signal, which is non-obvious and operationally important.

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 the verb and resource, then use cases, then return shape, then caveats — a logical order. It is on the long side and restates some schema content about English-only labels and the 50 cap, but no sentence is filler.

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?

Complete for a search tool: an output schema exists so return values need no explanation, yet the description still flags the fallback fields an agent must interpret. Query strategy, truncation handling, language limits, and latency are all covered, leaving nothing an agent needs before invoking it.

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%, so the baseline is 3; the schema already explains match, language, and the 50-result cap. The description adds one genuine piece of meaning beyond the schema — that match: "exact" disables the entry-term fallback — but otherwise repeats the language and max_results semantics the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ("Search for MeSH ... descriptors") and backs it with three concrete use cases (indexing, PubMed subject headings, controlled vocabulary). It does not clearly position itself against mesh_descriptor or mesh_tree; mesh_descriptor is only mentioned incidentally as the place where rare non-English labels surface.

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 "Use this tool to:" bullets give clear when-to-use context, and the closing paragraph tells the agent how to recover when results are truncated ("narrow the query or use match: startswith / exact"). It stops short of stating when to prefer a sibling lookup tool instead, but the guidance it does give is actionable.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.