Skip to main content
Glama

show_prices

Retrieve cached price data for all synced tickers: current price, previous close, change percent, 52-week high/low, dividend yield, sector, country, and last sync time. Use when you need price metadata not exposed in portfolio view.

Instructions

Raw cached price rows for all synced tickers — current_price, prev_close, change_percent, 52w high/low, dividend yield, sector, country, last sync time. Useful for tool-level inspection or when you need price metadata not exposed by show_portfolio (e.g. sector classification, sync freshness).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool 'show_prices' handler: queries all rows from the 'prices' table and returns them as JSON via the ok() helper.
    server.tool(
      'show_prices',
      'Raw cached price rows for all synced tickers — current_price, prev_close, change_percent, 52w high/low, dividend yield, sector, country, last sync time. Useful for tool-level inspection or when you need price metadata not exposed by show_portfolio (e.g. sector classification, sync freshness).',
      {},
      async () => {
        const db = getDb();
        return ok(db.select().from(prices).all());
      },
    );
  • Drizzle ORM schema definition for the 'prices' table, which is the data source queried by show_prices.
    export const prices = sqliteTable('prices', {
      ticker: text('ticker').primaryKey(),
      name: text('name').notNull(),
      exchange: text('exchange').notNull().default(''),
      currency: text('currency').notNull().default('USD'),
      current_price: real('current_price').notNull(),
      prev_close: real('prev_close').notNull().default(0),
      change_percent: real('change_percent').notNull().default(0),
      high_52w: real('high_52w').notNull().default(0),
      low_52w: real('low_52w').notNull().default(0),
      pe: real('pe'),
      eps: real('eps'),
      market_cap: real('market_cap').notNull().default(0),
      sector: text('sector'),
      country: text('country'),
      dividend_per_share: real('dividend_per_share'),
      dividend_yield: real('dividend_yield'),
      synced_at: text('synced_at').notNull(),
    });
  • Tool registration via server.tool() inside registerPortfolioTools(), which is called from index.ts line 19.
    server.tool(
      'show_prices',
      'Raw cached price rows for all synced tickers — current_price, prev_close, change_percent, 52w high/low, dividend yield, sector, country, last sync time. Useful for tool-level inspection or when you need price metadata not exposed by show_portfolio (e.g. sector classification, sync freshness).',
      {},
      async () => {
        const db = getDb();
        return ok(db.select().from(prices).all());
      },
    );
  • Top-level registration entry point that calls registerPortfolioTools to register show_prices on the MCP server.
    import { registerPortfolioTools } from './tools/portfolio.ts';
    import { registerReportTools } from './tools/report.ts';
    import { registerSnapshotTools } from './tools/snapshot.ts';
    import { registerStockTools } from './tools/stock.ts';
    import { registerPrompts } from './prompts.ts';
    
    const server = new McpServer(
      { name: 'firma', version: FIRMA_VERSION },
      { instructions: SERVER_INSTRUCTIONS },
    );
    
    registerPortfolioTools(server);
    registerReportTools(server);
    registerMutateTools(server);
    registerSnapshotTools(server);
  • The ok() helper wraps results in the MCP content response format used by show_prices.
    export const ok = (data: unknown) => ({
      content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
    });
Behavior4/5

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

With no annotations provided, the description carries full burden. It describes that the tool returns 'raw cached price rows', implying a read-only operation, and lists fields. It does not explicitly state side effects or permissions, but the behavior (reading cached data) is sufficiently clear for a non-destructive 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: first lists returned fields, second explains use case. No redundancy, every sentence is valuable and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and no output schema, the description provides all necessary context: what data is returned, that it is cached, and when to use it. It is self-contained and sufficient for an agent to understand and invoke correctly.

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 has no parameters, so parameter semantics are not applicable. According to guidelines, 0 parameters yields a baseline of 4. The description adds no parameter info, but none is needed.

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?

Description clearly states the tool returns raw cached price rows for all synced tickers, listing specific fields. It distinguishes itself from sibling show_portfolio by highlighting what metadata it provides that show_portfolio does not (e.g., sector classification, sync freshness). This gives a specific verb+resource with clear differentiation.

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?

Explicitly states the tool is useful for 'tool-level inspection or when you need price metadata not exposed by show_portfolio', giving clear guidance on when to use this tool versus the alternative sibling.

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/evan-moon/firma'

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