Skip to main content
Glama
harshil1502

tradingview-mcp

by harshil1502

quote_get

Retrieve a real-time quote snapshot for the active symbol, including last price, day OHLC, and volume.

Instructions

Get a real-time quote snapshot for the active symbol (last price, day OHLC, volume).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for quote_get. Calls page.getQuote() and wraps errors in ToolExecutionError.
    export async function quoteGet(
      _input: z.infer<typeof quoteGetInput>,
      page: TradingViewPage,
    ): Promise<z.infer<typeof quoteGetOutput>> {
      try {
        return await page.getQuote();
      } catch (cause) {
        throw new ToolExecutionError(
          'quote_get',
          'Failed to read quote — is a chart loaded?',
          cause,
        );
      }
    }
  • Input and output Zod schemas for quote_get. Input is empty strict object; output includes symbol, last, bid, ask, dayHigh, dayLow, dayOpen, dayClose, volume, timestamp.
    export const quoteGetInput = z.object({}).strict();
    
    export const quoteGetOutput = z.object({
      symbol: z.string(),
      last: z.number().nullable(),
      bid: z.number().nullable(),
      ask: z.number().nullable(),
      dayHigh: z.number().nullable(),
      dayLow: z.number().nullable(),
      dayOpen: z.number().nullable(),
      dayClose: z.number().nullable(),
      volume: z.number().nullable(),
      timestamp: z.string(),
    });
  • Registration of the quote_get tool in the tools array with name, description, input/output schemas, and handler function.
    // --- quote ---
    {
      name: 'quote_get',
      description:
        'Get a real-time quote snapshot for the active symbol (last price, day OHLC, volume).',
      input: quoteGetInput,
      output: quoteGetOutput,
      handler: quoteGet,
    },
  • Import statement bringing quoteGet, quoteGetInput, and quoteGetOutput from the quote module.
    import { quoteGet, quoteGetInput, quoteGetOutput } from './quote.js';
Behavior2/5

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

No annotations are provided, so the description carries full burden. It discloses the tool is a read operation (real-time snapshot), but omits critical behavioral details: the dependency on a pre-set 'active symbol', potential error conditions if no symbol is active, and any side effects or rate limits. The active symbol mechanism is not explained, leaving significant transparency gaps.

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 a single efficient sentence that front-loads the action and key outcomes. Every word contributes value, with no redundancy or filler.

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

Completeness3/5

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

For a zero-parameter tool with no output schema, the description covers the basic purpose and return fields. However, it lacks essential context about the active symbol dependency, how to ensure the symbol is set, and error handling. While low complexity reduces the burden, this missing information could lead to incorrect invocation.

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?

There are zero parameters, and the schema coverage is effectively 100%. According to guidelines, baseline is 4 when no parameters exist. The description adds no parameter-specific 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?

The description clearly states the tool retrieves a real-time quote snapshot for the active symbol, specifying the exact data fields (last price, day OHLC, volume). It distinguishes from sibling tools like chart_get_ohlcv which fetch historical OHLC data, not real-time snapshots.

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

Usage Guidelines3/5

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

The description implies usage when a real-time snapshot is needed but does not provide explicit guidance on when not to use it or alternatives. For instance, it does not mention that the active symbol must be set beforehand via chart_set_symbol, nor does it contrast with chart_get_ohlcv for historical data.

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/harshil1502/tradingview-mcp'

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