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

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.6/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: company_search is qualitative discovery, run_sql is quantitative querying, news_search covers news, sec_report_list/search handle filings, ticker_lookup resolves identifiers, and list_tables/get_table_schema/fiscal_utility support exploration. Cross-references between tools (e.g., company_search explicitly defers to run_sql) prevent confusion.

Naming Consistency4/5

Most tools follow a predictable noun_verb or noun_noun pattern (company_search, news_search, ticker_lookup, run_sql, list_tables, get_table_schema). sec_report_list and sec_report_search are clearly related with descriptive suffixes. Minor deviation: fiscal_utility is vaguer than its siblings, but the pattern is otherwise consistent.

Tool Count5/5

9 tools is right-sized for a financial data platform — enough for comprehensive coverage (search, query, schema, news, filings) without redundancy. Each tool serves a distinct purpose and the count fits the domain well.

Completeness5/5

The tool set forms a coherent workflow: ticker_lookup → company_search/run_sql for fundamentals, news_search for events, sec_report_list/search for filings, and list_tables/get_table_schema for schema discovery. The only minor gap is the absence of a direct 'company profiles' tool separate from company_search, but run_sql covers quantitative needs adequately. The surface is complete for a read-only financial analysis MCP.