Skip to main content
Glama
peakacom

peaka-mcp-server

Official
by peakacom

peaka_execute_sql_query

Read-only

Runs a SQL query on a Peaka project to fetch data, using schema and cache information to avoid incomplete results.

Instructions

Runs the given sql query on Peaka.

BEFORE RUNNING THIS TOOL:
  1: Use peaka_get_project_metadata to determine which tables should be used in the query and their schemas.
  2: Use peaka_list_tables to determine if the tables of interest are cached or not (this response has isCached property)
  3: If one or more tables that you need to query are cacheable but not cached:
    3a: Warn the user that the results will be limited and ask if you should start the caching process for those tables, and start the caching process using the create cache tool
    3b: If the caching is rejected by the user, warn them that the query results will be limited and use LIMIT statements on the query to make sure it doesn't run forever

If you do not already know the projectId for the current task, call peaka_list_projects first and ask the user which project to use. Remember the chosen projectId for subsequent calls in this conversation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
projectIdYesThe Peaka project ID to run against.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.11.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false; the description adds genuinely useful behavioral context beyond that: querying uncached tables yields limited results and can 'run forever,' which justifies the LIMIT instruction. This performance/limitation disclosure is valuable, though it does not mention response format, errors, or timeouts.

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 long but every section earns its place: the one-line purpose statement is front-loaded, and the numbered pre-flight checklist is scannable and actionable. The organization (purpose → prerequisites → fallbacks → projectId workflow) is logical and easy for an agent to follow.

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?

With no output schema and only two required parameters, the dominant complexity is the cache-detection and project-selection workflow, which is covered exhaustively. The absence of any mention of result format is a minor gap for a SQL query tool, but nothing essential for correct invocation is missing.

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 50%: projectId is documented in the schema, but the query parameter has no schema description. The description partially compensates by explaining how to obtain projectId (call peaka_list_projects, ask the user, remember it for later calls), but it adds nothing about the query parameter's format, dialect, or limitations — a real gap for the tool's primary input.

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 opening sentence states a specific verb ('Runs'), the resource ('the given sql query'), and the target ('Peaka'), which clearly conveys this executes raw SQL. It does not explicitly differentiate from the closely named sibling peaka_execute_query (which likely runs a saved query), so the distinction is left to inference rather than stated.

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

Usage Guidelines5/5

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

The 'BEFORE RUNNING THIS TOOL' section provides explicit sequential guidance: pull project metadata first, check isCached via peaka_list_tables, route to the create cache tool when tables are cacheable but uncached, and warn with LIMIT fallback if caching is rejected. It also names peaka_list_projects for projectId discovery, giving clear when-to-use context and named alternatives.

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

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

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