Skip to main content
Glama

rest_query

Query or mutate Postgres tables through REST API calls (GET, POST, PATCH, DELETE) with flexible query parameters and key type selection.

Instructions

Query or mutate data via the PostgREST REST API. Supports GET/POST/PATCH/DELETE with query params.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoRequest body for POST/PATCH (JSON object or array)
tableYesTable name to query
methodNoHTTP methodGET
paramsNoPostgREST query params (e.g. {select: 'id,name', order: 'id.asc', limit: '10'})
key_typeNoWhich key to use: anon (default, respects RLS) or service (bypasses RLS)anon
project_idNoThe project ID (defaults to the active project)
Behavior2/5

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

With no annotations, the description carries full burden. It indicates mutability (POST/PATCH/DELETE) but does not disclose authentication requirements, side effects, rate limits, or data persistence details. The key_type parameter is mentioned only in schema, not description.

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?

Extremely concise (20 words), with purpose front-loaded. Every word earns its place; no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite 6 parameters and no output schema, description is minimal. It lacks examples, response format hints, or usage patterns. An agent would need more detail to use the tool effectively, especially for constructing queries and handling responses.

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 baseline is 3. Description adds the concept of 'query params' but does not elaborate on any parameter beyond the method. It provides no additional semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool queries or mutates data via PostgREST REST API and supports common HTTP methods. However, it does not explicitly differentiate from similar tools like run_sql or contract_read, though the context of REST API vs SQL or contract calls is implied.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. Given siblings like run_sql (direct SQL) and contract_read (smart contracts), an agent would benefit from context on selecting the appropriate database access method.

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

Install Server

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/kychee-com/run402-mcp'

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