Skip to main content
Glama
cyntrica

Gov Data MCP

by cyntrica

code_mode

Read-only

Run custom JavaScript against any tool's response to extract only the fields, counts, or filters you need, then return just the concise console.log output.

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})
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses the WASM sandbox, the script's allowed operations (JSON.parse, loops, Math, console.log), its limitations (no files, network, Node.js APIs, imports), and the fact that only console.log output enters context. This gives a thorough behavioral profile.

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 front-loaded: after the core purpose sentence, it delivers usage guidance, capabilities/limitations, and a concrete example. Every sentence earns its place, and the length is justified by the tool's complexity.

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?

With no output schema, the description carries full responsibility for explaining inputs, behavior, and outputs. It covers the entire lifecycle—what it does, when to use it, how to write scripts, sandbox constraints, and the console.log return behavior—with an example that removes ambiguity.

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

Parameters5/5

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

Although the schema describes all 3 parameters, the description adds crucial meaning: DATA is the raw string response, console.log is the only output channel, and the detailed example ties together tool, tool_args, and code, demonstrating the exact usage pattern.

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 opens with a specific verb+resource: 'Run a JavaScript processing script against any tool's output in a WASM sandbox.' It then details the two-step flow (call tool, then run script on DATA), making it unmistakably distinct from the many data-retrieval sibling tools.

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?

It explicitly states 'USE THIS when you need specific fields, counts, or filters from a large response' and 'DO NOT use this when you need to read and interpret the full data for cross-referencing or analysis,' providing clear when-to-use and when-not-to-use guidance with implied alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyntrica/gov-data-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server