Skip to main content
Glama
lzinga

US Government Open Data MCP

by lzinga

code_mode

Read-onlyIdempotent

Run JavaScript to extract fields, counts, or filters from any tool's response, returning only concise console.log output to reduce context size.

Instructions

Run a JavaScript processing script against any tool's output in a WASM sandbox. Calls the specified tool first, then runs your script with the raw response as DATA (string). Only your script's console.log() output enters context — typically 65-99% smaller.

USE THIS when you need specific fields, counts, or filters from a large response. DO NOT use this when you need to read and interpret the full data for cross-referencing or analysis.

The script can: JSON.parse(DATA), use loops/map/filter/reduce, Math, string ops, console.log(). The script CANNOT: access files, network, Node.js APIs, or import modules.

Example — count serious reactions for a drug: tool='fda_drug_events', tool_args={"search":"patient.drug.openfda.brand_name:aspirin","limit":100}, code='const d=JSON.parse(DATA);const data=d.data||d;const items=data.items||data.results||[];' + 'const counts={};items.forEach(r=>{const rxs=r.reactions||[];rxs.forEach(rx=>{counts[rx]=(counts[rx]||0)+1})});' + 'Object.entries(counts).sort((a,b)=>b[1]-a[1]).slice(0,10).forEach(([k,v])=>console.log(k+": "+v))'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code to process the result. The tool's full response is available as DATA (string). Use JSON.parse(DATA) to parse it. Use console.log() to produce output. Only console.log output is returned — keep it concise.
toolYesName of the MCP tool to call (e.g. 'fda_drug_events', 'fred_series_data', 'congress_search_bills')
tool_argsNoArguments to pass to the tool, as a JSON object (e.g. {"search": "serious:1", "limit": 50})

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2026.4.11
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv2026.3.9

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already indicate read-only, idempotent, open-world, and non-destructive. The description adds crucial context beyond that: the script runs in a WASM sandbox restricting system access, and only console.log output enters context, implying context savings. No contradictions. The description adds meaningful behavioral constraints not in the annotations.

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?

The description is well-structured and compact. It starts with the core purpose, then usage guidance, then capabilities/limitations, and ends with a concrete example. Every sentence earns its place; the example is illustrative without being verbose.

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 description is complete for a complex tool. It explains how to use it, what the script can and cannot do, and provides a worked example. The output schema is not present, but the description clearly explains the output behavior (only console.log). The tool_args parameter is explained via example, and the tool parameter is explained via the example. With no output schema, the description fills the gap effectively.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already describes each parameter. The description adds additional semantic meaning: it clarifies that DATA is a string, only console.log output is returned, and provides a concrete example with realistic arguments. This goes beyond the schema's basic descriptions.

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?

The description states a specific verb ('Run'), a clear resource ('a JavaScript processing script against any tool's output'), and a distinctive mechanism (WASM sandbox, console.log output). It clearly differentiates from siblings by positioning itself as a general-purpose post-processor rather than a data-specific tool.

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 states when to use ('USE THIS when you need specific fields, counts, or filters from a large response') and when not to ('DO NOT use this when you need to read and interpret the full data for cross-referencing or analysis'). This is clear and actionable.

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

Deploy Server

Other Tools