Skip to main content
Glama

query_sql

Run read-only SQL SELECT queries on your MTG Arena collection database to identify owned, missing, and wildcard cards for deck building and collection analysis.

Instructions

Run an ad-hoc read-only SELECT against the collection database. Tables: cards, collection(grp_id,count), wildcards(kind,count). Join collection on cards.grp_id for owned counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It clearly states 'read-only SELECT' (safe, non-mutating) and lists the tables and join key, which tells the agent what data can be accessed. It does not mention auth, rate limits, or query limitations, but the read-only disclosure plus table schemas is substantial.

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?

The description is two sentences, front-loaded with the core action ('Run an ad-hoc read-only SELECT') followed by the supported tables and join hint. No filler or repetition; every clause adds value.

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?

The tool is simple (2 params, output schema exists) and the description covers the purpose, safety, and data model. It could be improved by explaining the limit parameter and when to prefer this over siblings, but given the output schema and simple interface, it is sufficiently complete.

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 compensates by documenting the target tables and columns (cards, collection(grp_id,count), wildcards(kind,count)) and showing the join relationship. It does not explicitly explain the 'limit' parameter or provide SQL syntax examples, but the table inventory gives meaningful context for constructing the 'sql' string.

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?

The description uses a specific verb ('Run an ad-hoc read-only SELECT') and identifies the exact resource ('collection database') and tables (cards, collection, wildcards). This clearly distinguishes it from sibling tools like search_cards or collection_summary, which are purpose-built, whereas this is a generic SQL query tool.

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 provides clear context that this tool is for ad-hoc read-only SQL queries, which implies it should be used when the dedicated sibling tools do not cover a custom query. However, it does not explicitly state when not to use it or name alternatives, so it stops short of full exclusionary guidance.

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/fkadriver/mtga-mcp'

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