Skip to main content
Glama
UHQ-Actual
by UHQ-Actual

Search SAM.gov Contract Opportunities

sam_opportunities_search

Search SAM.gov for solicitation opportunities using keywords, NAICS codes, procurement type, set-aside, and office state. Apply place-of-performance filters after retrieval.

Instructions

Search the official SAM.gov Opportunities API by title keywords, NAICS codes, procurement type, set-aside, contracting office state, and posted date range. Place-of-performance state and city filters are applied client-side because SAM.gov's v2 API does not support them server-side. Note: SAM.gov returns SOLICITATIONS (announcements), not awarded contracts; awardAmount is null on most rows. For awarded federal contracts with dollar amounts, use USAspending.gov instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateNoDeprecated alias for officeState. SAM.gov's state parameter filters by contracting office, not place of performance.
dryRunNoReturn sample opportunities without calling SAM.gov. Defaults to true when no SAM key is configured.
keywordsNoOpportunity title keywords.
maxResultsNoMaximum opportunities to return after filtering.
naicsCodesNoNAICS codes to search; each code is queried separately and deduplicated.
officeStateNoTwo-letter contracting OFFICE state code. Sent server-side as SAM.gov's `state=` filter; does NOT filter by where the work is performed.
setAsideTypeNoSAM.gov typeOfSetAside code, such as SBA, 8A, HZC, SDVOSBC, WOSB, or EDWOSB.
postedDaysAgoNoSearch opportunities posted within the last N days.
procurementTypesNoSAM.gov procurement type codes, such as o, k, r, p, a, or s. Defaults to o and k.
placeOfPerformanceCityNoPlace-of-performance city substring (case-insensitive). Filtered client-side after fetch because SAM.gov has no server-side city filter. For metro areas fan out across multiple cities (e.g., Lansing, East Lansing) and merge.
placeOfPerformanceStateNoTwo-letter place-of-performance state code. Filtered client-side after fetch because SAM.gov's API has no server-side POP state filter.
Behavior5/5

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

With no annotations provided, the description fully bears the burden. It discloses that SAM.gov returns solicitations (not awards), awardAmount is null on most rows, and certain filters are client-side. This is thorough behavioral transparency.

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 purpose, lists key filters, notes limitations, and ends with an alternative. Every sentence is essential; no redundancy or fluff.

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?

Given 11 parameters, 100% schema coverage, no output schema, the description fully explains the tool's behavior, limitations, and when not to use it. It is complete for an agent to use correctly.

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?

Schema coverage is 100%, so baseline is 3. The description adds significant meaning: e.g., 'state' is deprecated; 'dryRun' defaults true when no key; 'officeState' filters by contracting office not POP; 'placeOfPerformanceCity' and 'placeOfPerformanceState' are client-side. This exceeds expectations.

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 it searches 'SAM.gov Opportunities API by title keywords, NAICS codes, procurement type, set-aside, contracting office state, and posted date range.' It clearly distinguishes from sibling tools like sam_opportunity_detail (detail) and usaspending_award_search (awarded contracts).

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?

Provides explicit guidance: 'For awarded federal contracts with dollar amounts, use USAspending.gov instead.' Also notes that place-of-performance filters are applied client-side due to API limitations, helping the agent know when this tool is appropriate.

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/UHQ-Actual/DOL_MCP'

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