Skip to main content
Glama

artex_db_query

Run raw SQL against the ARTEX PostgreSQL database to inspect explorations, goals, assets, findings, or activity ad hoc. Use read-only SELECTs unless you intend to modify engine state.

Instructions

Run a raw SQL query against the ARTEX PostgreSQL DB (psql -t) for ad-hoc inspection of explorations, goals, assets, findings, or activity. Full SQL access — prefer read-only SELECTs unless you intend to modify engine state.

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": {
      "sql": "<sql>"
    },
    "name": "artex_db_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/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 meaningful work: it discloses the backend (PostgreSQL), the execution mode (psql -t, i.e. tuple-only output without headers), and — critically — that full SQL access means the tool can mutate engine state. It omits permission requirements, transaction/commit behavior, statement timeouts, and row limits, which matter for a full-access query tool.

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 the verb and target, followed by the mutation warning. Every clause earns its place and nothing is redundant.

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?

An output schema exists, so return-value explanation is rightly omitted, and the psql -t detail usefully frames the result shape. For a tool granting unrestricted SQL against a live database, a bit more on safety boundaries (read-only enforcement, timeouts, destructive DDL) would make it fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter has 0% schema description coverage, so the description must compensate, and it does: it establishes that 'sql' is raw PostgreSQL-dialect SQL executed via psql -t, which tells the agent both the dialect and the output shape. It does not clarify whether multiple statements, DDL, or placeholders are accepted.

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 gives a specific verb and resource ('Run a raw SQL query against the ARTEX PostgreSQL DB') and scopes the subject matter to explorations, goals, assets, findings, and activity. It implicitly separates itself from the structured list/read siblings by framing itself as ad-hoc raw SQL, but it never names a sibling or explicitly contrasts with them.

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?

It states the intended use case ('ad-hoc inspection') and gives a clear conditional preference ('prefer read-only SELECTs unless you intend to modify engine state'), which is real when-to-use guidance. It stops short of naming alternatives like artex_list_findings or artex_list_tasks for standard retrieval, so the routing decision is still partly left to inference.

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