Skip to main content
Glama
govconapi

io.github.govconapi/govconapi

Official

Search Opportunities

search_opportunities
Read-onlyIdempotent

Search federal contract opportunities on SAM.gov with filters for NAICS, agency, keywords, and more to find relevant bids and awards.

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
Behavior5/5

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

The description discloses behaviors well beyond the read-only/idempotent annotations: invalid set_aside/notice_type values trigger a 400 with a full valid-term list, date_from is clamped with a disclosed window block, sort_by defaults to relevance when keywords are set, and value filters only apply to Award Notice records. This is rich, actionable context.

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 long but every sentence serves a purpose for a 20-parameter endpoint. Parameter names are labels, examples are concrete, and critical rules (required filter, max limit, error behavior) are front-loaded or clearly highlighted. No filler exists.

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 the complexity (20 params, no schema descriptions, no enums), the description is complete: it covers mandatory filters, valid values, error handling, clamping, defaults, limits, response structure, and links to related tools. The presence of an output schema reduces the need to detail return fields, and the description still summarizes the top-level response blocks.

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 for 20 parameters. It provides format examples, valid values, error behavior, and defaults for nearly every parameter, including nuanced guidance for set_aside, notice_type, and date clamping. Only offset is not explicitly described, but pagination is mentioned in the response shape.

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 first sentence states a specific verb and resource: 'Search federal contract opportunities (SAM.gov data) with filters.' This clearly differentiates the tool from siblings like get_opportunity (single record) and recent_changes (full sync), and the closing line reinforces the distinction.

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 requires at least one filter, tells the agent to use lookup_agency first for agency names, and directs full-database sync to recent_changes. It gives concrete usage constraints and alternatives, leaving little to inference.

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

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

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