Skip to main content
Glama

run_sql_plus_plus_query

Execute SQL++ queries on a specific Couchbase scope with named parameters to prevent injection, returning results as JSON objects.

Instructions

Run a SQL++ query on a scope and return the results as a list of JSON objects.

The query will be run on the specified scope in the specified bucket. The query should use collection names directly without bucket/scope prefixes, as the scope context is automatically set.

Use named_parameters to bind values to $name placeholders in the query instead of concatenating user input into the statement. This prevents SQL++ injection

Example: query = "SELECT * FROM users WHERE age > 18" # Incorrect: "SELECT * FROM bucket.scope.users WHERE age > 18"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
scope_nameYes
bucket_nameYes
named_parametersNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

Annotations are absent, so the description must disclose behavior. It mentions 'query' but does not clarify whether the tool supports read-only or mutation operations (e.g., INSERT, UPDATE). No warning about side effects, permissions, or rate limits is given.

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 description is relatively concise, with a clear structure and an illustrative example. The example adds value, but the overall length could be trimmed slightly without losing meaning.

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

Completeness3/5

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

The description covers the main functionality, parameter usage, and a security note. However, it omits important context such as whether mutations are allowed, error handling, and pagination. An output schema exists but is not detailed here.

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 0%, so the description must explain parameters. It describes that bucket_name and scope_name set the context, and named_parameters binds values to placeholders. However, it does not elaborate on the exact format or constraints for each parameter, leaving some detail lacking.

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?

The description clearly states it runs a SQL++ query on a specified scope and returns JSON objects. It explains the query syntax requirement (no prefixes). However, it does not explicitly distinguish from the sibling tool 'explain_sql_plus_plus_query', leaving some ambiguity about which tool to use for execution vs. explanation.

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?

The description provides a best practice (use named_parameters to prevent injection) but does not guide when to use this tool versus alternatives like get_document_by_id or get_schema_for_collection. There is no comparison or decision-making context.

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/couchbase/mcp-server-couchbase'

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