Skip to main content
Glama
elephant-xyz

Elephant MCP Server

by elephant-xyz

Query permits (SQL)

queryPermits

Run read-only SQL SELECT statements against county-level building permit records, using a DuckDB-backed permits view to retrieve up to 1000 rows per query.

Instructions

Run a read-only SQL SELECT against a county's flat permit query table (view name 'permits', one row per building permit) backed by embedded DuckDB. Use getPermitQuerySchema first to see available columns and getPermitCoverage to qualify aggregate answers by source. SAFETY: a single SELECT statement only (a leading WITH/CTE is allowed); multiple statements and any mutating or file/extension keyword (INSERT/UPDATE/DELETE/COPY/ATTACH/INSTALL/LOAD/PRAGMA/CALL/SET …) are rejected; results are always capped at 1000 rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA single read-only SELECT statement over the 'permits' view.
limitNoMax rows to return (default 100, max 1000). Always enforced.
countyYesCounty to query (case-insensitive), e.g. 'Lee'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.12.1

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it does so thoroughly: it discloses read-only behavior, allows a leading WITH/CTE, lists rejected mutating and file/extension keywords, and states the 1000-row result cap. This gives the agent a clear safety envelope before calling.

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 compact and front-loaded: purpose first, then companion tools, then safety rules. Every sentence earns its place, and the safety constraints are grouped in a single clearly labeled sentence rather than buried in prose.

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 SQL tool with no annotations and no output schema, this is complete: it explains the data source, tells the agent how to learn the columns, warns about aggregates/source qualification, and fully specifies the allowed SQL envelope and row cap. The agent has everything needed to call and interpret results correctly.

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?

The schema already documents all three parameters at 100% coverage, so the baseline is 3. The description adds value beyond the schema by defining the SQL constraint surface (single SELECT, WITH allowed, prohibited keywords) and pointing to getPermitQuerySchema for available columns, which enriches the meaning of the sql and limit parameters.

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 states a specific verb and resource: run a read-only SQL SELECT against a county's permits view backed by embedded DuckDB. It also clarifies the data grain (one row per building permit) and names the relevant companion tools, so it is unmistakably distinct from property/place query siblings.

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 tells the agent to call getPermitQuerySchema first to discover columns and getPermitCoverage to qualify aggregate answers, which is practical usage context. It does not explicitly state when NOT to use this tool versus queryProperties/queryPlaces, but the purpose and preconditions are strong enough to route correctly.

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