{"openapi":"3.1.0","info":{"title":"Shovels (BYOK) API","version":"0.1.0","description":"Shovels (BYOK) lets an AI assistant read your own Shovels data through the Shovels API with a key you supply (Shovels API key). Read-only: 11 tools (search_permits, search_contractors, search_decisions, search_cities, search_counties, search_jurisdictions, get_city_permit_metrics, get_permit_data_coverage, list_permit_tags, get_data_release_date, get_credit_usage). The BYOK key travels with each...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-shovels.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-shovels/docs"},"termsOfService":"https://connectorbay.com/byok-shovels/terms"},"servers":[{"url":"https://byok-shovels.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-shovels/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/search_permits":{"post":{"operationId":"search_permits","summary":"Search building permits in an area and date range, filtered by tags, status, property type, minimum job value or descrip","description":"Search building permits in an area and date range, filtered by tags, status, property type, minimum job value or description text. Each returned record counts as one credit of the plan allowance. Use for \"Which solar permits were started in California in the first half of 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"geo_id":{"description":"Area to search: a US state code such as CA, a ZIP code such as 90210, or a Shovels geo id from the city, county or jurisdiction search tools.","maxLength":200,"title":"Geo Id","type":"string"},"permit_from":{"description":"Earliest permit start date, YYYY-MM-DD.","maxLength":200,"title":"Permit From","type":"string"},"permit_to":{"description":"Latest permit start date, YYYY-MM-DD.","maxLength":200,"title":"Permit To","type":"string"},"permit_tags":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"A single permit tag such as solar or roofing; prefix with a minus sign to exclude it. Use list_permit_tags for the tags.","title":"Permit Tags"},"permit_status":{"anyOf":[{"enum":["final","in_review","inactive","active"],"type":"string"},{"type":"null"}],"default":null,"description":"One permit status: final, in_review, inactive or active.","title":"Permit Status"},"property_type":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"One property type, for example residential, commercial, industrial, agricultural, vacant land, exempt, office or recreational.","title":"Property Type"},"permit_q":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Case-insensitive text to find in the permit description.","title":"Permit Q"},"permit_min_job_value":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Minimum job value in cents (5000000 means 50,000 dollars).","title":"Permit Min Job Value"},"include_count":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include the total match count on the first page.","title":"Include Count"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer (omit for the first page).","title":"Cursor"},"size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (1 to 100). Each returned record counts as one plan credit.","title":"Size"}},"required":["geo_id","permit_from","permit_to"],"title":"search_permitsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_contractors":{"post":{"operationId":"search_contractors","summary":"Search contractors that did permitted work in an area and date range, by business name or derived trade classification. ","description":"Search contractors that did permitted work in an area and date range, by business name or derived trade classification. Each returned record counts as one credit of the plan allowance. Use for \"Which electrical contractors were active in ZIP 94607 this year\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"geo_id":{"description":"Area to search: a US state code such as CA, a ZIP code such as 90210, or a Shovels geo id from the city, county or jurisdiction search tools.","maxLength":200,"title":"Geo Id","type":"string"},"permit_from":{"description":"Earliest permit start date, YYYY-MM-DD.","maxLength":200,"title":"Permit From","type":"string"},"permit_to":{"description":"Latest permit start date, YYYY-MM-DD.","maxLength":200,"title":"Permit To","type":"string"},"contractor_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Business name text to match (at least 3 characters).","title":"Contractor Name"},"contractor_classification_derived":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"One derived trade classification such as electrical or hvac; prefix with a minus sign to exclude it.","title":"Contractor Classification Derived"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer (omit for the first page).","title":"Cursor"},"size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (1 to 100). Each returned record counts as one plan credit.","title":"Size"}},"required":["geo_id","permit_from","permit_to"],"title":"search_contractorsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_decisions":{"post":{"operationId":"search_decisions","summary":"Search zoning and land-use decisions (rezonings, variances and similar) in an area and date range, with project value an","description":"Search zoning and land-use decisions (rezonings, variances and similar) in an area and date range, with project value and old and new zoning. Each returned record counts as one credit. Use for \"What rezoning decisions were made in California in 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"geo_id":{"description":"Area to search: a US state code such as CA, a ZIP code such as 90210, or a Shovels geo id from the city, county or jurisdiction search tools.","maxLength":200,"title":"Geo Id","type":"string"},"decision_from":{"description":"Earliest decision date, YYYY-MM-DD.","maxLength":200,"title":"Decision From","type":"string"},"decision_to":{"description":"Latest decision date, YYYY-MM-DD.","maxLength":200,"title":"Decision To","type":"string"},"category":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"One decision category such as Rezoning or Variance.","title":"Category"},"asset_class":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"One asset class such as Residential, Commercial or Mixed-Use.","title":"Asset Class"},"decision_q":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Full-text query against decision title and description.","title":"Decision Q"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer (omit for the first page).","title":"Cursor"},"size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (1 to 100). Each returned record counts as one plan credit.","title":"Size"}},"required":["geo_id","decision_from","decision_to"],"title":"search_decisionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_cities":{"post":{"operationId":"search_cities","summary":"Find US cities by name and get their Shovels geo id for use in the other tools. Use for \"What is the Shovels geo id for ","description":"Find US cities by name and get their Shovels geo id for use in the other tools. Use for \"What is the Shovels geo id for Oakland\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"description":"Name text to search for (a few letters of the place name).","maxLength":100,"title":"Q","type":"string"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer (omit for the first page).","title":"Cursor"},"size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (1 to 100). Each returned record counts as one plan credit.","title":"Size"}},"required":["q"],"title":"search_citiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_counties":{"post":{"operationId":"search_counties","summary":"Find US counties by name and get their Shovels geo id for use in the other tools. Use for \"What is the Shovels geo id fo","description":"Find US counties by name and get their Shovels geo id for use in the other tools. Use for \"What is the Shovels geo id for Alameda County\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"description":"Name text to search for (a few letters of the place name).","maxLength":100,"title":"Q","type":"string"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer (omit for the first page).","title":"Cursor"},"size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (1 to 100). Each returned record counts as one plan credit.","title":"Size"}},"required":["q"],"title":"search_countiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_jurisdictions":{"post":{"operationId":"search_jurisdictions","summary":"Find permitting jurisdictions (the offices that issue permits) by name and get their geo id. Use for \"Which permitting j","description":"Find permitting jurisdictions (the offices that issue permits) by name and get their geo id. Use for \"Which permitting jurisdictions match Oakland\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"description":"Name text to search for (a few letters of the place name).","maxLength":100,"title":"Q","type":"string"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer (omit for the first page).","title":"Cursor"},"size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (1 to 100). Each returned record counts as one plan credit.","title":"Size"}},"required":["q"],"title":"search_jurisdictionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_city_permit_metrics":{"post":{"operationId":"get_city_permit_metrics","summary":"Get current permit statistics for one city, for one property type and permit tag: permit count, contractor count, averag","description":"Get current permit statistics for one city, for one property type and permit tag: permit count, contractor count, average approval and construction days, total job value and inspection pass rate. Use for \"How many residential solar permits does Oakland have and how long do approvals take\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"geo_id":{"description":"Shovels geo id of the city, from search_cities.","maxLength":200,"title":"Geo Id","type":"string"},"property_type":{"description":"Property type: residential, commercial, industrial, agricultural, vacant land, exempt, miscellaneous, office or recreational.","maxLength":200,"title":"Property Type","type":"string"},"tag":{"description":"Permit tag to measure, for example solar.","maxLength":200,"title":"Tag","type":"string"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer (omit for the first page).","title":"Cursor"},"size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many records to return (1 to 100). Each returned record counts as one plan credit.","title":"Size"}},"required":["geo_id","property_type","tag"],"title":"get_city_permit_metricsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_permit_data_coverage":{"post":{"operationId":"get_permit_data_coverage","summary":"Show how complete the permit data is for a state, county, city, ZIP or jurisdiction over a date range, per field (fees, ","description":"Show how complete the permit data is for a state, county, city, ZIP or jurisdiction over a date range, per field (fees, job value, contractor and others). Use for \"How complete is the Shovels permit data for Oakland in 2025\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"geo_type":{"description":"What kind of area geo_id is.","enum":["state","county","city","zipcode","jurisdiction"],"title":"Geo Type","type":"string"},"geo_id":{"description":"Two-letter state code, 5-digit ZIP, or a geo id for a city, county or jurisdiction.","maxLength":200,"title":"Geo Id","type":"string"},"date_from":{"description":"Start of the window, YYYY-MM-DD.","maxLength":200,"title":"Date From","type":"string"},"date_to":{"description":"End of the window, YYYY-MM-DD (not before date_from).","maxLength":200,"title":"Date To","type":"string"}},"required":["geo_type","geo_id","date_from","date_to"],"title":"get_permit_data_coverageArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_permit_tags":{"post":{"operationId":"list_permit_tags","summary":"List the permit tags (such as solar, roofing, hvac) that can be used to filter permit searches, with a description of ea","description":"List the permit tags (such as solar, roofing, hvac) that can be used to filter permit searches, with a description of each. Use for \"Which permit tags does Shovels support\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Pagination cursor: the next_cursor value from the previous answer (omit for the first page).","title":"Cursor"},"size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many tags to return (1 to 100).","title":"Size"}},"title":"list_permit_tagsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_data_release_date":{"post":{"operationId":"get_data_release_date","summary":"Show when the data currently served by the Shovels API was released. Use for \"When was the Shovels permit data last upda","description":"Show when the data currently served by the Shovels API was released. Use for \"When was the Shovels permit data last updated\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_data_release_dateArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_credit_usage":{"post":{"operationId":"get_credit_usage","summary":"Show the plan's credits used in the rolling 30 days, the credit limit and daily usage. Use for \"How many Shovels credits","description":"Show the plan's credits used in the rolling 30 days, the credit limit and daily usage. Use for \"How many Shovels credits have I used this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_credit_usageArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}