Skip to main content
Glama

Search SAM.gov contract opportunities

search_opportunities
Read-onlyIdempotent

Search active federal contract opportunities on SAM.gov: solicitations, presolicitations, sources sought, RFIs, and award notices - filterable by keywords, NAICS, set-aside (SDVOSB, 8(a), HUBZone, WOSB, small business), notice type, agency, and posted-date range (max 1 year). Call this when the user wants to find federal bidding opportunities or market intelligence on what agencies are buying. Requires the caller's own free SAM.gov API key (X-Sam-Api-Key header or sam_api_key argument); without one it returns an error explaining how to get and pass a key.

Input Schema

NameRequiredDescriptionDefault
limitNoMax results (default 10)
agencyNoDepartment/agency name filter
keywordsNoFree-text keywords, e.g. "CMMC compliance"
posted_toNoYYYY-MM-DD (default: today)
set_asideNoSet-aside codes: SDVOSBC/SDVOSBS (SDVOSB), VSA/VSS (VOSB), SBA/SBP (small business), 8A/8AN, HZC/HZS (HUBZone), WOSB/EDWOSB
naics_codesNoNAICS codes, e.g. ["541512"]
notice_typeNoo=solicitation, p=presolicitation, r=sources sought, k=combined synopsis, g=surplus, s=special notice, a=award notice, i=intent to bundle, u=J&A
posted_fromNoYYYY-MM-DD (default: 90 days ago; SAM allows at most a 1-year window)
sam_api_keyNoYour own free SAM.gov API key. Required unless it is already set as the X-Sam-Api-Key header on the MCP connection; this server has no shared SAM.gov key. Get one free at sam.gov: sign in, open your profile (Account Details), request a public API key. Docs: https://open.gsa.gov/api/get-opportunities-public-api/. Never logged or stored.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / sam_api_key / description
      Previous value: -"Optional: your own free SAM.gov API key (from sam.gov → Account Details). With it you spend your own 1,000/day quota and skip the shared budget. Can also be sent once as the X-Sam-Api-Key header on the MCP connection."New value: +"Your own free SAM.gov API key. Required unless it is already set as the X-Sam-Api-Key header on the MCP connection; this server has no shared SAM.gov key. Get one free at sam.gov: sign in, open your profile (Account Details), request a public API key. Docs: https://open.gsa.gov/api/get-opportunities-public-api/. Never logged or stored."
  2. First observed

TDQS

A4.1/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, non-destructive, open world). The description adds genuinely new context beyond them: the required caller-owned SAM.gov API key, the error behavior when absent, and the 1-year date window cap. It stops short of describing result shape or pagination.

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?

Three sentences, front-loaded with what the tool does, then when to use it, then the auth prerequisite. Dense but each sentence carries distinct information; minor overlap between the enumerated notice types and the notice_type enum.

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?

For a 9-parameter, optional-only-param search tool with no output schema, the description covers purpose, usage trigger, filterable dimensions, and the critical auth requirement. Only real gap is that it does not sketch the return shape despite there being no output schema.

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%, so every parameter is already documented in the schema, including enum code mappings and the date-window limit. The description restates filter categories (NAICS, set-aside, notice type, agency, dates) without adding syntax or defaults beyond the schema; 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 (Search) and resource (active federal contract opportunities on SAM.gov), then enumerates the notice categories covered. This clearly separates it from siblings like search_awards (awards) and find_agency/find_naics (reference lookups).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear trigger condition: 'Call this when the user wants to find federal bidding opportunities or market intelligence on what agencies are buying.' No explicit when-not or named alternative (e.g., use search_awards for past awards), which keeps it short of a 5.

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