Skip to main content
Glama

rest_query

Query or mutate Postgres database tables using GET, POST, PATCH, DELETE methods with PostgREST query parameters and optional RLS bypass.

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?

No annotations exist. The description says 'mutate' but does not disclose destructive behavior (DELETE), authorization needs (key_type in schema), rate limits, or side effects. The schema parameter descriptions help slightly, but overall transparency is low.

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?

Two sentences, front-loaded with purpose, then methods. No waste; every sentence contributes meaning.

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?

Complex tool with 6 parameters (including nested object) and no output schema. Description fails to mention return format, pagination, error handling, or how results are structured. Incomplete for an AI agent to reliably invoke.

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 description coverage is 100% with detailed parameter descriptions. The tool description adds high-level context ('Query or mutate data') but does not further explain parameters beyond what the schema provides, so baseline 3 is appropriate.

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 clearly states the tool makes REST API queries/mutations ('Query or mutate data via the PostgREST REST API'). It distinguishes from siblings like run_sql by specifying the REST interface.

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

Usage Guidelines3/5

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

The description mentions supported methods (GET/POST/PATCH/DELETE) which implies usage, but lacks explicit when-to-use or alternatives (e.g., run_sql for SQL). No exclusions or prerequisites provided.

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/MajorTal/run402'

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