Skip to main content
Glama

Drillr — The financial MCP for AI agents

run_sql

Read-only

PostgreSQL SELECT over financial / market / alt-data tables — returns structured rows.

Hard rules (query fails otherwise):

  • SELECT only, no CTE (WITH ... AS) — use subqueries.

  • Period columns are TEXT, not dates — period_end is 'YYYY-MM'. Compare as strings (period_end >= '2024-01'); a ::date cast on it fails.

  • Filter structured tables by ticker (WHERE ticker IN ('AAPL','MSFT'); screening: add ticker NOT LIKE '%-%' to drop preferred stock).

Core equity coverage: US, Japan, Hong Kong, China A-shares, and Korea. Tickers are US bare (AAPL), Japan .T (6758.T), Hong Kong .HK (00700.HK), A-shares .SH/.SZ (600519.SH), and Korea .KS/.KQ (005930.KS). financial_statements, company_snapshot, and price_volume_history span all five. Specialized tables may be narrower — call get_table_schema before treating an empty result as a finding.

Tables by domain (call get_table_schema for detail):

  • Market: price_volume_history (OHLCV history; MUST filter ticker + time_frame), index_price, equity_extended_rt (pre/after/overnight quotes)

  • Fundamentals: financial_statements (GAAP income/balance/cashflow), company_snapshot (ratios, per-share, growth)

  • Earnings: earning_call_summary, earning_call_calendar

  • Analyst: analyst_ratings, analyst_ratings_consensus

  • Ownership: insider_and_institution_activities

  • 8-K events: executive_change, company_deal_events, debt_issuance, securities_offering

  • Executives: executive_profile, executive_compensation

  • Alt-data: macro / industry / trade / AI-supply-chain — call list_tables(categories=[...])

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesPostgreSQL SELECT query

Schema Changelog

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

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description discloses key behaviors beyond the annotations: SELECT-only restriction, no CTE support, period column type constraints (TEXT, not date, with specific comparison syntax), and ticker filtering requirements. It aligns with readOnlyHint=true and destructiveHint=false, and adds the nuance that empty results may not be findings without schema verification.

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 well-structured with clear sections: hard rules, coverage, tables by domain. It front-loads the most critical constraints (hard rules) before listing tables. Each section earns its place; the table listing is verbose but necessary for a query tool with heterogeneous tables. Slightly excessive length for a description, but effective organization prevents wasted space.

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 description is thorough for a tool with one parameter and no output schema: it explains coverage (US, Japan, HK, China, Korea), table categories, and query constraints. It references sibling tools (get_table_schema, list_tables) to fill gaps. However, it lacks details on return format (e.g., row limits, pagination, error handling for invalid SQL), which would be useful for a raw SQL tool.

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 input schema covers the 'sql' parameter 100% with a description 'PostgreSQL SELECT query'. The description adds value by providing example query patterns (ticker IN ('AAPL','MSFT'), ticker NOT LIKE '%-%' for screening) and table-specific usage notes, which are not in the schema. However, since the schema already adequately describes the parameter, the baseline is 3, with the description's examples lifting it to 4.

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 specifies 'PostgreSQL SELECT over financial / market / alt-data tables — returns structured rows', giving a clear verb (SELECT), resource (PostgreSQL tables), and scope (financial/market/alt-data). It distinguishes itself from sibling tools like get_table_schema, list_tables, and search tools by explicitly focusing on direct SQL querying over the database tables.

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?

Provides explicit when-to-use guidance: it tells the agent to call get_table_schema before treating empty results as findings, lists tables by domain, and specifies hard rules for query construction (e.g., no CTEs, period columns as TEXT, filter by ticker). This clearly signals when to use this tool versus alternatives like list_tables or get_table_schema.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.3/5.0
Disambiguation4/5

Each tool targets a distinct retrieval task: company discovery, ticker resolution, filing metadata/content, SQL metadata/execution, news, AI adoption, and industry inflections. The only mild overlap is between ai_adoption and industry_inflections, both earnings-call derived, but their descriptions differentiate application-level insights from structural inflection analysis.

Naming Consistency3/5

All names are lowercase snake_case and readable, but the conventions are mixed: noun_verb forms like company_search and news_search, verb_noun forms like run_sql and list_tables, and bare noun phrases like ai_adoption and industry_inflections. A uniform verb_noun pattern would make the toolset more predictable.

Tool Count5/5

Ten tools is well-scoped for a financial data platform: search/discovery tools, filing tools, SQL metadata/execution tools, and a ticker resolver. Each tool earns its place, and there is no obvious redundancy or padding.

Completeness5/5

The toolset forms coherent workflows: ticker_lookup resolves entities, filing_list/filing_search handle SEC filings, list_tables/get_table_schema enable SQL discovery, and run_sql provides broad query coverage across market, fundamental, and alt-data domains. Cross-references between tools explicitly direct agents to the correct next step, leaving no critical dead ends.