Skip to main content
Glama

Swapwire

Search contractor licenses

search_licenses
Read-onlyIdempotent

Search contractor licenses (California by default; pass state for others) three ways. (1) By business name, as written on a quote, invoice, truck or website: typos, word forms (plumber/plumbing), missing words and Inc/LLC are handled, and other names on the CSLB record are matched too (other_business_names lists the ones that are business names). Each match has a match_level (exact, strong, partial) and says what it matched on. (2) By license number. (3) With no name, by trade and/or city to list licensed contractors. The trade can be a description of the job ("my AC is blowing warm air", "sewage backing up"); read_as says how it was read. Lists: clear licenses only by default, in a shuffled order fixed until the next data refresh, 10 per page, up to 5 pages. Lists are not rankings or recommendations. A name match is not proof of identity, so give the user the license number and ask them to confirm it with the contractor.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_licenses"
  }
}

Input Schema

NameRequiredDescriptionDefault
cityNoCity or ZIP code, e.g. "Oakland", "Oakland, CA" or "94704".
nameNoBusiness name or part of it, e.g. "Diamond Plumbing". Leave out to list by trade and/or city.
pageNoFor lists: page number, default 1.
workNoCalifornia lists only: a kind of work from city permits, e.g. "water heater", "heat pump", "sewer". Lists only contractors with San Francisco permits for that work in the last five years.
stateNoTwo-letter state code. Default CA. Others with data: CO, CT, FL, IL, KS, MN, NY, OR, PA, TX, VA, WA.
tradeNoTrade in plain words or a CSLB code, e.g. "plumbing", "furnace", "water heater", "sewer line", "C-36".
statusNoFor lists: clear (default) or all, which includes suspended and other licenses.
licenseNoCSLB license number, if you have one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (which already declare read-only, idempotent, non-destructive, closed-world), the description discloses list composition (clear licenses only by default), ordering (shuffled, fixed until next refresh), pagination (10 per page, up to 5 pages), and the critical caveat that lists are not rankings and a name match is not proof of identity. That is substantial behavioral context an agent cannot get from structured fields.

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?

The three-way structure is front-loaded and numbered, making it easy to scan, and each clause carries information. It is dense and slightly long, with the closing identity-confirmation instruction arguably separable, but nothing is truly wasted.

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 an 8-parameter tool with no output schema, the description covers response shape (match_level, matched-on field, other_business_names, read_as), result limits, default filtering, and the safety caveat about identity. An agent has everything needed to call it correctly and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine interpretive meaning: name matching tolerates typos, word forms and missing Inc/LLC, trade accepts a natural-language job description whose interpretation is reported in read_as, and each result carries a match_level. It does not add much about state or page beyond the schema.

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 and resource ("Search contractor licenses") and immediately enumerates the three distinct search modes: name, license number, and trade/city listing. This lets an agent distinguish a fuzzy name search from a direct license lookup without opening the schema.

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?

It clearly states when each mode applies — name as written on a quote/invoice/website, license number if you have one, or no name to list by trade and/or city — and tells the agent to leave name out for listing. It does not explicitly route to or away from the sibling get_license tool, which is the main gap.

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