Skip to main content
Glama

Openfda Describe Fields

openfda_describe_fields
Read-only

Return the searchable field paths for an openFDA endpoint, grouped by category with type and description. Use before constructing a search query to find the correct dotted field path — field names differ per endpoint and are not discoverable from the tool schema alone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYesopenFDA endpoint to describe (e.g. "drug/event", "drug/shortages", "device/510k"). Must be one of the cataloged endpoints.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
groupsNoField groups for this endpoint
endpointNoThe endpoint these fields apply to
queryTipsNoopenFDA query syntax reminders relevant to this endpoint

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / groups / items / properties / fields / items / properties / countAs
      Added value: +{
      +  "description": "Verified expression to pass as count in openfda_count_values (the bare path or path.exact); null when openFDA cannot aggregate the field in any form",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / properties / groups / items / properties / fields / items / required
      Previous value: -[
      -  "path",
      -  "type",
      -  "note"
      -]New value: +[
      +  "path",
      +  "type",
      +  "countAs",
      +  "note"
      +]
  2. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "endpoint",
      +      "groups",
      +      "queryTips"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode.",
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "endpoint",
      -  "groups",
      -  "queryTips"
      -]
  3. Changed1 schema field changed
    • changedInput schema / properties / endpoint / enum
      Previous value: -[
      -  "drug/event",
      -  "drug/label",
      -  "drug/enforcement",
      -  "drug/ndc",
      -  "drug/drugsfda",
      -  "drug/shortages",
      -  "food/event",
      -  "food/enforcement",
      -  "device/event",
      -  "device/510k",
      -  "device/pma",
      -  "device/recall",
      -  "device/enforcement",
      -  "animalandveterinary/event",
      -  "tobacco/problem"
      -]New value: +[
      +  "drug/event",
      +  "drug/label",
      +  "drug/enforcement",
      +  "drug/ndc",
      +  "drug/drugsfda",
      +  "drug/shortages",
      +  "food/event",
      +  "food/enforcement",
      +  "device/event",
      +  "device/510k",
      +  "device/pma",
      +  "device/recall",
      +  "device/enforcement",
      +  "device/classification",
      +  "device/registrationlisting",
      +  "device/udi",
      +  "device/covid19serology",
      +  "animalandveterinary/event",
      +  "tobacco/problem",
      +  "other/substance"
      +]
  4. Added

TDQS

A4.3/5.0
Behavior3/5

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

Annotations provide readOnlyHint=true, so the description doesn't need to restate that. The description adds context about the return format (grouped by category with type and description), but there's no further behavioral detail like performance or error cases. With the readOnly annotation covering safety, a 3 is appropriate.

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 sentences, front-loaded with the primary action and return, followed by a clear usage directive. No fluff or repetition of schema details.

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?

The tool is simple with one parameter and a detailed enum in the schema. The description adds the critical usage context and return structure. An output schema exists, so return values are covered. Nothing essential is missing for correct invocation.

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 coverage is 100% — the parameter `endpoint` is fully described with an enum and an example. The description adds value by mentioning that field paths are endpoint-specific, reinforcing but not extending the schema. Baseline 3 is correct here since the schema does the heavy lifting.

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 ('Return'), resource ('searchable field paths for an openFDA endpoint'), and grouping ('by category with type and description'). It clearly distinguishes itself from sibling search tools by focusing on field discovery rather than data retrieval.

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?

Explicitly instructs to use before constructing a search query and explains why: field names differ per endpoint and are not discoverable from the schema. This clearly routes the agent to this tool when needing field paths, versus other tools that execute queries.

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.