Skip to main content
Glama
openfda-substance-registry-mcp

openfda-substance-registry-mcp

Get FDA GSRS substance statistics

get_substance_stats
Read-onlyIdempotent

Aggregate FDA GSRS substance counts by substance class, external code system, name type, or definition type to profile registry composition and identify distribution patterns.

Instructions

Aggregate FDA GSRS substance counts grouped by substance class, external code system, name type, or definition type.

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

Input Schema

NameRequiredDescriptionDefault
limitNoMax aggregation buckets to return (default 10).
queryNoOptional substance name filter.
group_byNoAggregation dimension (default "substance_class").

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.3/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so the safety profile is fully covered. The description adds no behavioral context beyond the purpose statement: no mention of what a bucket looks like, whether counts are exact, whether the limit silently truncates results, or any cost/latency/rate considerations.

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?

A single front-loaded sentence with zero filler; every clause (verb, resource, grouping dimensions) earns its place. Nothing is buried or redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter, zero-required aggregation tool with no output schema, the description states what is returned at the conceptual level (counts) but omits response shape and truncation behavior. Annotations cover the safety profile, so the remaining gap is moderate rather than severe.

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%, including defaults for limit and group_by and the enum values, so the schema carries parameter semantics. The description re-lists the four grouping dimensions but adds no syntax, interaction, or edge-case guidance beyond what the schema already provides, making baseline 3 appropriate.

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?

States a specific verb and resource ("Aggregate FDA GSRS substance counts") plus the four grouping dimensions, which inherently distinguishes it from siblings like search_substances that return records rather than counts. It stops short of explicitly contrasting itself with those alternatives, so it is clear but not maximally differentiating.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The aggregation framing implies when to use it (when you need distribution counts rather than substance records), but there is no explicit when-to-use, when-not-to-use, or named alternative such as search_substances for record retrieval. Usage is only implied by the verb.

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