Skip to main content
Glama

Batch Search Contracts

batch_search_procurement
Read-onlyIdempotent

DEPRECATED ALIAS — prefer search_procurement with a queries[] array, which now runs the identical batch fan-out. Kept for backward compatibility; behavior is unchanged. Search federal contracts (SAM.gov) comprehensively. Returns 10 results by default (~4KB). Use detail_level and max_results to control response size. Response includes total available count so you can request more if needed. When sam_filters.pop_state (alias: place_of_performance_state) is set, the response includes a placeOfPerformance field summed across every sub-query (matched, unknownServed with unknowns excluded instead when user_context.location_strict is true, and otherStateExcluded). Counts toward your monthly searches. A batch counts as 1 call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceNoStateless alternative to posted_within_days/new_within_days: ISO 8601 instant. Only opportunities ingested at/after this instant.
offsetNoNumber of results to skip for pagination (default: 0). Use with max_results to page through large result sets. Example: offset=100 with max_results=100 returns results 101-200.
sourceNoFilter every batch sub-query to a specific source/domain, e.g. "sam.gov".
queriesYesArray of 2-5 search queries to run in parallel. Example for IT services: ["IT services contract", "software development federal", "technology consulting government", "computer services procurement"]
max_resultsNoMaximum opportunities to return (default: 10, max: 100). Token cost guide: 10 results ~4KB, 25 results ~10KB, 50 results ~20KB, 100 results ~40KB.
sam_filtersNoSAM.gov specific filters
detail_levelNoControls response verbosity. minimal (~120 bytes/result): id, title, org, deadline, url, qualityScore - best for scanning 50+ results. compact (~400 bytes/result, DEFAULT): adds snippet, category, status, deadlineType, daysUntilDeadline, deadlineLabel, and lastRoundClosedAt - good for recommendations. full (~1.5KB/result): everything including eligibility, amounts - only use with max_results <= 10.compact
user_contextNo
new_within_daysNoBackwards-compatible alias for posted_within_days. Only opportunities ingested (added by us) in the last N days -- for recurring/delta checks ("what is new since my last check"). Applied per sub-query before dedupe; response includes deduped newSince.newCount and the newest/oldest ingest timestamp in the window.
posted_within_daysNoPreferred alias for new_within_days: only opportunities ingested (added by us) in the last N days. Applied per sub-query before dedupe; the response includes a deduped newSince summary. If both posted_within_days and new_within_days are supplied, posted_within_days wins.
max_response_tokensNoToken budget for response (default: 4000 ≈ 16KB). Server auto-caps results to fit. Increase to 8000-16000 for more results per call, decrease to 2000 for lightweight scanning.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / user_context / properties / location_strict / description
      Previous value: -"When sam_filters.pop_state is also set: false (default) demotes results with no confirmed location below confirmed matches and caveats them; true excludes them instead of demoting."New value: +"With a recognized location, requests geographic filtering; nationwide or unspecified records and explicitly broader fallbacks may remain. Check geographyFilterOutcome and warnings. With sam_filters.place_of_performance_state (or pop_state in batch), true additionally excludes records without a confirmed performance location; false demotes and caveats them."
  2. Changed3 schema fields changed
    • addedInput schema / properties / sam_filters / properties / place_of_performance_state
      Added value: +{
      +  "description": "Preferred alias for pop_state; wins if both are set.",
      +  "type": "string"
      +}
    • changedInput schema / properties / sam_filters / properties / pop_state / description
      Previous value: -"Place of performance state code"New value: +"Place of performance state code. Alias: place_of_performance_state, which wins if both are set."
    • addedInput schema / properties / user_context / properties / location_strict
      Added value: +{
      +  "description": "When sam_filters.pop_state is also set: false (default) demotes results with no confirmed location below confirmed matches and caveats them; true excludes them instead of demoting.",
      +  "type": "boolean"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / detail_level / description
      Previous value: -"Controls response verbosity. minimal (~120 bytes/result): id, title, org, deadline, url, qualityScore - best for scanning 50+ results. compact (~300 bytes/result, DEFAULT): adds snippet, category, status - good for recommendations. full (~1.5KB/result): everything including eligibility, amounts - only use with max_results <= 10."New value: +"Controls response verbosity. minimal (~120 bytes/result): id, title, org, deadline, url, qualityScore - best for scanning 50+ results. compact (~400 bytes/result, DEFAULT): adds snippet, category, status, deadlineType, daysUntilDeadline, deadlineLabel, and lastRoundClosedAt - good for recommendations. full (~1.5KB/result): everything including eligibility, amounts - only use with max_results <= 10."
  4. Changed1 schema field changed
    • changedInput schema / properties / max_results / description
      Previous value: -"Maximum results to return (default: 10). Token cost guide: 10 results ~4KB, 25 results ~10KB, 50 results ~20KB, 100 results ~40KB. No hard cap - use judgment based on your context window."New value: +"Maximum opportunities to return (default: 10, max: 100). Token cost guide: 10 results ~4KB, 25 results ~10KB, 50 results ~20KB, 100 results ~40KB."
  5. Changed1 schema field changed
    • addedInput schema / properties / source
      Added value: +{
      +  "description": "Filter every batch sub-query to a specific source/domain, e.g. \"sam.gov\".",
      +  "type": "string"
      +}
  6. Changed3 schema fields changed
    • changedInput schema / properties / new_within_days / description
      Previous value: -"Only opportunities ingested (added by us) in the last N days -- for recurring/delta checks (\"what is new since my last check\"). Applied per sub-query before dedupe; the final merged/deduped list is sorted newest-ingested-first when this is set. Response includes newSince.newCount and the newest/oldest ingest timestamp in the window."New value: +"Backwards-compatible alias for posted_within_days. Only opportunities ingested (added by us) in the last N days -- for recurring/delta checks (\"what is new since my last check\"). Applied per sub-query before dedupe; response includes deduped newSince.newCount and the newest/oldest ingest timestamp in the window."
    • addedInput schema / properties / posted_within_days
      Added value: +{
      +  "description": "Preferred alias for new_within_days: only opportunities ingested (added by us) in the last N days. Applied per sub-query before dedupe; the response includes a deduped newSince summary. If both posted_within_days and new_within_days are supplied, posted_within_days wins.",
      +  "type": "number"
      +}
    • changedInput schema / properties / since / description
      Previous value: -"Stateless alternative to new_within_days: ISO 8601 instant. Only opportunities ingested at/after this instant."New value: +"Stateless alternative to posted_within_days/new_within_days: ISO 8601 instant. Only opportunities ingested at/after this instant."
  7. Changed2 schema fields changed
    • addedInput schema / properties / new_within_days
      Added value: +{
      +  "description": "Only opportunities ingested (added by us) in the last N days -- for recurring/delta checks (\"what is new since my last check\"). Applied per sub-query before dedupe; the final merged/deduped list is sorted newest-ingested-first when this is set. Response includes newSince.newCount and the newest/oldest ingest timestamp in the window.",
      +  "type": "number"
      +}
    • addedInput schema / properties / since
      Added value: +{
      +  "description": "Stateless alternative to new_within_days: ISO 8601 instant. Only opportunities ingested at/after this instant.",
      +  "type": "string"
      +}
  8. Changed3 schema fields changed
    • changedInput schema / properties / sam_filters / properties / set_aside / description
      Previous value: -"Set-aside type (e.g., \"Small Business\", \"8(a)\", \"HUBZone\")"New value: +"Set-aside type. Supported: SDVOSB, VOSB, WOSB, EDWOSB, 8a/8(a), HUBZone, SBA/\"Small Business\" (each expands to all matching SAM codes and CSV labels). Actually filters results."
    • changedInput schema / properties / sam_filters / properties / set_aside_code / description
      Previous value: -"Set-aside code (e.g., \"SBA\", \"8A\", \"HZ\")"New value: +"Exact SAM set-aside code (e.g., \"SBA\", \"8A\", \"SDVOSBC\"). Prefer set_aside for common terms."
    • addedInput schema / properties / user_context / properties / organization_type / description
      Added value: +"Common natural-language phrasing (e.g. \"501(c)(3) nonprofit\") is also parsed; unparseable values are ignored with an explicit note in the response."
  9. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive, so the bar is lower, but the description still adds substantial behavioral context: default response size ~4KB, total available count included, placeOfPerformance aggregation semantics, monthly-search quota impact, and that a batch counts as one call. It even discloses subtle interaction behavior with user_context.location_strict. This goes well beyond what annotations provide.

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 front-loaded with the most important decision-relevant fact (deprecated alias, use search_procurement), followed by the core function and response-size guidance. It is dense but every sentence earns its place; nothing is filler or redundant with the schema.

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?

For a complex tool with 11 parameters and no output schema, the description provides the essentials: deprecation status, replacement route, default result count, size-control levers, total-count behavior, aggregation semantics, and quota impact. Combined with the detailed input schema, there is enough information for an agent to invoke this tool correctly and interpret the response.

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?

Input schema coverage is 91% with rich per-parameter descriptions, so the baseline is 3. The description adds meaningful parameter strategy: it calls out using detail_level and max_results to manage response size, notes the default 10-result response, and highlights that total available count lets the agent request more. It does not repeat the full schema, which is appropriate given the high schema coverage.

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 clear 'DEPRECATED ALIAS' label and names the preferred replacement, search_procurement, while still stating the actual function: 'Search federal contracts (SAM.gov) comprehensively.' This lets an agent distinguish it from search_procurement and understand it is a backward-compatibility shim. The verb and resource are specific and unmistakable.

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 description explicitly says to prefer search_procurement with a queries[] array and explains that this tool is kept only for backward compatibility. It also gives practical guidance on controlling response size with detail_level and max_results, which helps the agent make appropriate choices. No guessing is required about when to choose this tool or its sibling.

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.

Resources