Skip to main content
Glama

Search government contracts

search_contracts
Read-onlyIdempotent

Use this when the user wants US federal or state government contract opportunities to bid on: bids, RFPs, solicitations, set-asides.

Filters: naics (up to 10 codes), state, keyword (title only), set_aside (federal only), type (federal or state), posted_within_days (1 to 180), open (default true), agency (a name; the note says which agency it matched), limit (1 to 50, default 20). If has_more is true, call again with cursor=next_cursor and the same filters. Example: naics="238160", state="VA", keyword="roof". Pass several NAICS codes in one call.

Print each result's url, and sam_url for federal notices, as markdown links.

Do not use for grants (search_grants), jobs (search_jobs) or one result's details (get_opportunity).

When you are done searching, call show_results once with the best ids; it shows them as a card the user can pick from.

Input Schema

NameRequiredDescriptionDefault
openNotrue (the default): only items with a response deadline of today or later, US Eastern; an item with no deadline counts as closed. false: include closed ones.
typeNoNarrow to federal or to state contracts. Leave empty for both.
limitNoNumber of results to return, 1 to 50.
naicsNoUp to 10 six-digit NAICS codes, comma-separated, e.g. '236220' or '541511,541512'. A notice matches on its own codes (matched_naics says which), or through a code MatchAwards' AI suggested: that one is listed in ai_matched_naics, so call the match AI-suggested. Unknown codes are ignored.
stateNoTwo-letter US state code, e.g. 'VA'. Many federal notices have no state, so this filter skips them.
agencyNoAgency name, e.g. 'Department of Veterans Affairs'; matched to the closest MatchAwards agency, which the result note names.
cursorNonext_cursor from the previous response. Pass it with the same filters to get the next page.
keywordNo2 to 100 characters matched against the title only.
set_asideNoSet-aside code, e.g. 'SBA' or 'SDVOSBC'. Federal contracts only.
posted_within_daysNoOnly items posted in the last N days, 1 to 180 (default 180).

Output Schema

NameRequiredDescriptionDefault
noteNo
as_ofNoWhen the API generated the results (ISO time).
resultsYes
warningNoSet when paging stopped early; the results so far are still valid.
has_moreYestrue: call again with cursor=next_cursor and the same filters.
next_cursorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / agency
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 100,
      +      "minLength": 2,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Agency name, e.g. 'Department of Veterans Affairs'; matched to the closest MatchAwards agency, which the result note names.",
      +  "title": "Agency"
      +}
    • changedInput schema / properties / naics / description
      Previous value: -"Up to 10 six-digit NAICS codes, comma-separated, e.g. '236220' or '541511,541512'. Unknown codes are ignored."New value: +"Up to 10 six-digit NAICS codes, comma-separated, e.g. '236220' or '541511,541512'. A notice matches on its own codes (matched_naics says which), or through a code MatchAwards' AI suggested: that one is listed in ai_matched_naics, so call the match AI-suggested. Unknown codes are ignored."
    • addedOutput schema / $defs
      Added value: +{
      +  "Naics": {
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Code"
      +      },
      +      "title": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Title"
      +      }
      +    },
      +    "title": "Naics",
      +    "type": "object"
      +  },
      +  "OpportunityRow": {
      +    "description": "One search result. Jobs fill title, agency (the employer), state, city, posted_at and url only.",
      +    "properties": {
      +      "agency": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Agency"
      +      },
      +      "agency_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The agency's MatchAwards id.",
      +        "title": "Agency Id"
      +      },
      +      "ai_matched_naics": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Only when you filtered by naics: requested codes this contract notice matched only because MatchAwards' AI suggested them, not its own codes. Call such a match AI-suggested.",
      +        "title": "Ai Matched Naics"
      +      },
      +      "city": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "City"
      +      },
      +      "id": {
      +        "description": "Pass to get_opportunity for the description and contacts.",
      +        "title": "Id",
      +        "type": "string"
      +      },
      +      "matched_naics": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Only when you filtered by naics: the requested codes this record carries: its own code (in naics) or, for a grant or job, another code of its program or occupation.",
      +        "title": "Matched Naics"
      +      },
      +      "naics": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/$defs/Naics"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "On state notices (type state) the naics code itself is AI-assigned."
      +      },
      +      "no_fixed_deadline": {
      +        "anyOf": [
      +          {
      +            "type": "boolean"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "true: the deadline is a placeholder date.",
      +        "title": "No Fixed Deadline"
      +      },
      +      "office": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Office"
      +      },
      +      "posted_at": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Date, YYYY-MM-DD.",
      +        "title": "Posted At"
      +      },
      +      "response_deadline": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Date, YYYY-MM-DD; null if none.",
      +        "title": "Response Deadline"
      +      },
      +      "sam_url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The SAM.gov notice (federal only). Show it as a markdown link.",
      +        "title": "Sam Url"
      +      },
      +      "set_aside": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Set Aside"
      +      },
      +      "solicitation_number": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Solicitation Number"
      +      },
      +      "state": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "State"
      +      },
      +      "title": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Title"
      +      },
      +      "type": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "federal, state, grant or job.",
      +        "title": "Type"
      +      },
      +      "url": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The posting on matchawards.com. Show it as a markdown link.",
      +        "title": "Url"
      +      }
      +    },
      +    "required": [
      +      "id"
      +    ],
      +    "title": "OpportunityRow",
      +    "type": "object"
      +  }
      +}
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / properties
      Added value: +{
      +  "as_of": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": null,
      +    "description": "When the API generated the results (ISO time).",
      +    "title": "As Of"
      +  },
      +  "has_more": {
      +    "description": "true: call again with cursor=next_cursor and the same filters.",
      +    "title": "Has More",
      +    "type": "boolean"
      +  },
      +  "next_cursor": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": null,
      +    "title": "Next Cursor"
      +  },
      +  "note": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": null,
      +    "title": "Note"
      +  },
      +  "results": {
      +    "items": {
      +      "$ref": "#/$defs/OpportunityRow"
      +    },
      +    "title": "Results",
      +    "type": "array"
      +  },
      +  "warning": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": null,
      +    "description": "Set when paging stopped early; the results so far are still valid.",
      +    "title": "Warning"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "results",
      +  "has_more"
      +]
    • changedOutput schema / title
      Previous value: -"search_contractsDictOutput"New value: +"SearchResult"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/destructive/idempotent safety, so the bar is lower. The description adds real behavioral context beyond that: pagination semantics (has_more/cursor), the note that explains which agency and NAICS matched, that ai_matched_naics covers AI-suggested codes, and that unknown NAICS are ignored.

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?

Front-loaded with the trigger sentence, then filters, then exclusions, then output instructions. The filter enumeration duplicates the schema somewhat, but the ordering is logical and no sentence is purely filler.

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 10-param search tool with an output schema and full annotation coverage, the description supplies everything an agent needs: selection criteria, exclusions, pagination rules, and the required markdown-link rendering plus show_results follow-up.

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 coverage is 100%, so the schema fully documents each parameter with defaults and constraints; the description's filter list is largely a recital of the same fields. It adds only marginal value, e.g. 'Pass several NAICS codes in one call' and the open=true default praxis.

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?

Opens with a specific trigger ('the user wants US federal or state government contract opportunities to bid on') and enumerates the resource types (bids, RFPs, solicitations, set-asides). An agent can immediately separate this from search_awards, search_grants, and search_jobs.

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?

Explicitly names when NOT to use it and the alternative for each case (search_grants, search_jobs, get_opportunity), and adds the surrounding workflow: paginate with cursor when has_more, then call show_results once with the best ids.

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.