Skip to main content
Glama
db-conn-mcp

db-conn-mcp

fetch_rows

Retrieve the next batch of rows from an open database query cursor and report whether the result set is exhausted or the cursor has closed.

Instructions

Fetch the next N rows from an open cursor (see open_query_cursor).

Returns {rows, row_count, exhausted, cursor_closed}; the cursor closes itself once fully drained.

Rows arrive on the text channel only, inside the untrusted-data banner: this tool emits no structuredContent.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cursor_id": "<cursor_id>"
    },
    "name": "fetch_rows"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNo
cursor_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it names the return fields, explains the self-closing drain behavior, and warns that rows arrive only on the text channel inside an untrusted-data banner with no structuredContent — critical for how the agent parses results. It omits what happens on an invalid or expired cursor_id, which is the main remaining gap.

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?

Three short blocks, front-loaded with the action, followed by the return shape and then the channel constraint. Every sentence adds information an agent needs and nothing is padding.

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

Completeness4/5

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

No output schema exists, so the description correctly supplies the return keys and the text-channel caveat, which is exactly what would otherwise be missing. Only error and expiry semantics for the cursor are left undefined.

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 0%, so the description must compensate for two undocumented parameters. It explains that n is the row count to fetch and that cursor_id refers to an open cursor from open_query_cursor, but adds no default value, upper bound, or format for either.

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?

States a specific verb and resource ('Fetch the next N rows from an open cursor') and names the sibling relationship to open_query_cursor, so an agent can separate pagination from cursor creation immediately.

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?

The parenthetical '(see open_query_cursor)' establishes the prerequisite cursor workflow, and the note that the cursor self-closes once drained implicitly tells the agent not to follow up with close_cursor. No explicit statement of when not to use it, but the operating context is clear.

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