Skip to main content
Glama
govconapi

io.github.govconapi/govconapi

Official

Search Opportunities

search_opportunities
Read-onlyIdempotent

Search SAM.gov federal contract opportunities by NAICS, PSC, agency, keywords, state, set-aside, notice type, dates, or value. Get matching opportunities with pagination and applied filters.

Instructions

Search federal contract opportunities (SAM.gov data) with filters.

At least one filter is required. Use specific values:

  • naics: 6-digit NAICS code, e.g. "541330" (engineering services)

  • psc: 1-4 char Product Service Code, e.g. "D302" (IT services)

  • naics_multiple: comma-separated NAICS codes, e.g. "541511,541512"

  • agency: agency name substring (use full names, e.g. "FEDERAL EMERGENCY MANAGEMENT" not "FEMA"; use lookup_agency tool first)

  • keywords: full-text search across title, agency, description (min 3 chars)

  • state: 2-letter state code (CA, TX) or full name (California)

  • set_aside: a plain term (HUBZone, WOSB, 8(a), Veteran, Small Business, Indian Small Business, Buy Indian, ...) or an exact SAM code (SBA, SDVOSBC, HZC, ...). An unrecognized value returns 400 WITH THE FULL VALID-TERM LIST in the response body, retry using that list rather than guessing another synonym.

  • notice_type: Solicitation, Combined Synopsis/Solicitation, Presolicitation, Sources Sought, Award Notice, Justification, Justification and Approval (J&A), Special Notice, Sale of Surplus Property, Modification/Amendment/Cancel, Consolidate/ (Substantially) Bundle. Comma-separate several to match any. Invalid values 400 the same way as set_aside, the full list comes back in the error.

  • posted_after / due_before / due_after / date_from / date_to: YYYY-MM-DD. A date_from before your plan's history window is not silently dropped, it's clamped, and the response's window block (clamped, date_from_requested, reason) discloses exactly what happened.

  • value_min / value_max: USD amounts (only Award Notice records have values)

  • has_attachments: true/false

  • sort_by: posted_date, due_date, award_amount, title, agency, relevance (used automatically when keywords is set and sort_by is omitted)

  • sort_order: asc | desc (default desc), e.g. sort_by=due_date + sort_order=asc for "what's due soonest first"

  • limit: max 1000

Returns JSON with data (matching opportunities), pagination, filters_applied, and (only when a date_from clamp applied) window. For full-database sync use the recent_changes tool instead. Each result's award_uei_sam (when present) is the same identifier get_entity/get_company_profile take as uei, and notice_id is what get_opportunity takes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pscNo
limitNo
naicsNo
stateNo
agencyNo
offsetNo
date_toNo
sort_byNo
keywordsNo
date_fromNo
due_afterNo
set_asideNo
value_maxNo
value_minNo
due_beforeNo
sort_orderNo
notice_typeNo
posted_afterNo
naics_multipleNo
has_attachmentsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it reveals non-obvious behavior: invalid set_aside/notice_type values return 400 with the full valid-term list, date_from clamping is disclosed in a window block, relevance is auto-selected with keywords, and only Award Notice records carry values. This is exceptional disclosure.

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?

Although long, the description is tightly organized around parameter names with inline examples and constraints. Every line adds operational value, and the purpose statement plus the 'at least one filter is required' warning are front-loaded before the parameter details.

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 20-parameter tool with no required schema fields, this description covers the essential invocation contract: required-filter enforcement, sorting defaults, pagination, response envelope, clamping disclosure, cross-tool IDs, and explicit routing to recent_changes. The output schema exists, so detailed return-field documentation is not the description's job.

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?

With 0% schema description coverage, the description carries the full burden and delivers: every parameter gets format, examples, constraints, or defaults (NAICS 6-digit, PSC 1-4 chars, YYYY-MM-DD dates, USD limits, max 1000). It even explains failure modes and recovery steps for set_aside and notice_type.

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, and data source: 'Search federal contract opportunities (SAM.gov data) with filters.' It also differentiates itself from sibling tools by naming recent_changes for full-database sync and get_opportunity for single-record retrieval, making its scope unmistakable.

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?

The description gives explicit usage constraints: at least one filter is required, agency names should be looked up via lookup_agency first, and recent_changes should be used instead for full-database sync. It does not explicitly contrast itself with search_awards or search_contracts, so it stops short of fully naming all alternative-tool conditions.

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

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/govconapi/govconapi-mcp'

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