Skip to main content
Glama
cliwant

mcp-sam-gov

dol_get_dataset

Read-only

Fetch records from a specific U.S. Department of Labor dataset using agency abbreviation and endpoint, with optional limit, offset, and equality filters. Requires a free DOL API key.

Instructions

Fetch records from ONE US DOL dataset (apiprod.dol.gov /v4/get/{agency}/{endpoint}/json). ★REQUIRES a free DOL_API_KEY: the DOL DATA endpoint has NO keyless tier — without the key this tool THROWS an honest config error (get one at https://dataportal.dol.gov/registration; dol_list_datasets stays keyless). Input: agency (required — the agencyAbbr from dol_list_datasets, e.g. 'WHD'/'OSHA'/'ILAB'; rides the PATH, ^[A-Za-z0-9_]+$), table (required — the dataset's apiUrl endpoint from dol_list_datasets; rides the PATH, ^[A-Za-z0-9_]+$), optional limit (def 10, max 100), offset, filterField+filterValue (paired equality filter), fields (best-effort column selection). Returns { records:[…verbatim dataset rows…] } + honest _meta. HONESTY: records are surfaced VERBATIM (field names/values preserved as-is — genuine 0 stays 0, missing field stays null; never coerced or fabricated). totalAvailable is a real count ONLY when the response carries one, else null (honest unknown — returned is NEVER passed off as the total). A full page → hasMore; page forward to confirm. Missing/invalid key (401/403) → invalid_input carrying DOL_API_KEY guidance (never empty); 400 → invalid_input; genuine empty → honest empty; 429 → rate_limited THROWS (Retry-After honored); 5xx/timeout → upstream_unavailable THROWS; 200 non-JSON / no row array → schema_drift. Key rides ONLY in the X-API-KEY request header — never URL/_meta.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax records to return (default 10, max 100). Offset-paginated.
tableYesThe dataset endpoint — the `apiUrl` field from dol_list_datasets (the DOL 'api_url', NOT the tablename), e.g. 'Child_Labor_Report__2016_to_2022'. Rides in the request PATH. Validated ^[A-Za-z0-9_]+$. Required.
agencyYesThe agency abbreviation (the `agencyAbbr` from dol_list_datasets), e.g. 'WHD', 'OSHA', 'ILAB'. Rides in the request PATH. Validated ^[A-Za-z0-9_]+$. Required.
fieldsNoOptional: best-effort column selection (a subset of field names to return). Not documented for v4; the API ignores or 400s an unsupported selection (surfaced honestly).
offsetNoRow offset for pagination (default 0). Page with _meta.pagination.nextOffset.
filterFieldNoOptional: a dataset field name to filter on (paired with filterValue → a DOL filter_object equality filter). Supply BOTH or NEITHER.
filterValueNoOptional: the value the filterField must equal. Supply BOTH filterField and filterValue, or NEITHER.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true and openWorldHint=true, so the description carries the behavioral burden — and it delivers richly: full error taxonomy (401/403→invalid_input with key guidance, 429→rate_limited THROWS honoring Retry-After, 5xx→upstream_unavailable, 200 non-JSON→schema_drift), the verbatim-data honesty policy (genuine 0 stays 0, missing stays null), and the guarantee that `returned` is never passed off as `totalAvailable`. It even specifies key transport (X-API-KEY header only, never URL/_meta).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long, but it is front-loaded (purpose first, then the critical auth requirement) and every sentence carries operational information — error mapping, pagination semantics, honesty guarantees — rather than filler. The repeated 'honest/honesty' emphasis is stylistically redundant across several sentences, which costs it the top score, but nothing here is wasted.

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 fully specifies the return contract: { records: […] verbatim rows }, honest _meta with the totalAvailable-null-if-unknown rule, and hasMore semantics for paging forward. All failure modes, the auth requirement, and the keyless alternative are covered. Given the tool's complexity (7 params, external API, auth, multiple error classes), nothing an agent needs to call it correctly is left to guesswork.

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%, so the input schema already documents all 7 parameters, including the paired filterField/filterValue constraint and the regex validation. The description adds marginal value beyond this — mainly that parameters 'ride the PATH' and that inputs derive from dol_list_datasets fields — but most of its parameter text mirrors what the schema already states, so the baseline of 3 is appropriate.

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 pair — 'Fetch records from ONE US DOL dataset' — and pinpoints the endpoint shape (/v4/get/{agency}/{endpoint}/json). It also names the keyless sibling dol_list_datasets inside the description, so an agent can immediately tell this is the data-fetching tool as opposed to the dataset-discovery one.

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?

The key precondition is stated explicitly and without ambiguity: 'REQUIRES a free DOL_API_KEY... the DOL DATA endpoint has NO keyless tier,' with a registration URL and the note that 'dol_list_datasets stays keyless.' It also tells the agent exactly where its inputs come from (agencyAbbr and apiUrl from dol_list_datasets), giving clear when-to-use and dependency guidance.

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