Skip to main content
Glama

Openfda Dataframe Describe

openfda_dataframe_describe
Read-onlyIdempotent

List the tables and column schemas on a DataCanvas staged by an openFDA search tool. Call before openfda_dataframe_query to discover the exact table name, column names, and DuckDB types needed for valid SQL. row_count is the full staged result set, not the inline preview count. Columns typed JSON hold nested openFDA objects/arrays — query them with DuckDB json functions.

Input Schema

NameRequiredDescriptionDefault
canvas_idYesCanvas ID from the canvas_id field of an openFDA search tool response (openfda_search_* or openfda_lookup_ndc), present when the search ran with stage=true.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
tablesNoAll tables and views available on this canvas.
canvas_idNoCanvas ID that was described — pass to openfda_dataframe_query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is disabled — CANVAS_PROVIDER_TYPE is unset. `canvas_not_found`: The canvas_id does not correspond to an active canvas session. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `canvas_disabled`: DataCanvas is disabled — CANVAS_PROVIDER_TYPE=none. `canvas_not_found`: The canvas_id does not correspond to an active canvas session. Other values are possible when a failure originates below the handler."
  2. Changed3 schema fields changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Canvas ID from an openFDA search tool response (present when the search ran with stage=true)."New value: +"Canvas ID from the canvas_id field of an openFDA search tool response (openfda_search_* or openfda_lookup_ndc), present when the search ran with stage=true."
    • removedInput schema / properties / canvas_id / minLength
      Removed value: -1
    • changedInput schema / properties / canvas_id / pattern
      Previous value: -"\\S"New value: +"^[A-Za-z0-9_-]{10}$"
  3. 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": [
      +      "tables",
      +      "canvas_id"
      +    ]
      +  },
      +  {
      +    "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. Declared by this tool: `canvas_disabled`: DataCanvas is disabled — CANVAS_PROVIDER_TYPE is unset. `canvas_not_found`: The canvas_id does not correspond to an active canvas session. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "canvas_disabled",
      +            "canvas_not_found"
      +          ],
      +          "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: -[
      -  "tables",
      -  "canvas_id"
      -]
  4. Changed1 schema field changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Canvas ID from an openFDA search tool response."New value: +"Canvas ID from an openFDA search tool response (present when the search ran with stage=true)."
  5. Changed2 schema fields changed
    • addedInput schema / properties / canvas_id / minLength
      Added value: +1
    • addedInput schema / properties / canvas_id / pattern
      Added value: +"\\S"
  6. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), yet the description adds non-obvious behavior: row_count reflects the full staged result set rather than the inline preview, and JSON-typed columns hold nested openFDA objects that must be queried with DuckDB json functions. Missing only failure/precondition behavior (e.g., what happens if the canvas was not staged or has expired).

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?

Four compact sentences, front-loaded with the purpose and then the call ordering, followed by two caveats that each prevent a concrete failure mode. No filler or restatement of the title.

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?

With an output schema present, the description needn't enumerate return values, and it still supplies the two facts an agent most needs to interpret them (row_count scope, JSON column typing). Only gap is precondition/failure guidance for a missing or non-staged canvas.

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 the single canvas_id parameter is fully documented, including its 10-character pattern source. The description adds no further parameter semantics beyond referring to the staged canvas, so baseline 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 — 'List the tables and column schemas' on a DataCanvas staged by an openFDA search tool — and clearly distinguishes itself from openfda_describe_fields (field catalogs) and openfda_dataframe_query (SQL execution). An agent can pick it out of the sibling list without opening the schema.

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 prescribes the sequencing: 'Call before openfda_dataframe_query' and names the purpose (discover table name, column names, DuckDB types for valid SQL). The triggering condition — a canvas staged via openfda_search_* / openfda_lookup_ndc with stage=true — is spelled out in both description and schema.

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.