Skip to main content
Glama
Portward

Portward

by hamzaelsiesy

query

Run a read-only SQL SELECT against a data source to answer a user's question, capturing any assumptions for review when definitions don't cover part of the question.

Instructions

Run one read-only SQL SELECT against a source. question is the user's question. When no definition you were given covers part of the question, say what you assumed in assumptions, one short sentence each ("active customer means an order in the last 90 days"); they're kept with this answer on the user's computer, for them to review and turn into definitions.

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": {
      "source": "<source>",
      "sql": "<sql>",
      "question": "<question>"
    },
    "name": "query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYes
sourceYes
questionYes
assumptionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the key trait that the query is read-only and limited to a single SELECT, and that assumptions are persisted locally for user review. It omits error behavior, statement limits, and what the result looks like, leaving meaningful gaps for an unannotated tool.

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?

Front-loads the core action in the first sentence, then explains the assumptions convention. The parenthetical example earns its place by clarifying format, though the assumptions sentence is slightly long.

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?

No output schema and no annotations, so the description should do more. It covers read-only behavior, question, and assumptions, but leaves sql/source semantics and return shape unexplained for a 4-parameter tool.

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 compensate. It explains `question` (the user's question) and `assumptions` (one short sentence each, kept with the answer), but says nothing about `sql` or `source`, leaving half the parameters undocumented.

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?

States a specific verb and resource: "Run one read-only SQL SELECT against a source." An agent can tell this is the query-execution tool, distinct from siblings like describe_source or add_source, though it never names an alternative explicitly.

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?

Gives a conditional rule for the assumptions parameter ("When no definition you were given covers part of the question..."), which is useful usage context. However, it offers no guidance on when to prefer this tool over siblings such as describe_source or compare, and no when-not conditions.

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