Skip to main content
Glama
stockmarketscan

stockmarketscan/mcp-server

Official

get_options_flow_signals

Read-onlyIdempotent

Retrieve curated high-conviction options flow signals filtered by long streaks, large premium, and screener confluence. Each signal includes performance tracking with max high and max drawdown percentages.

Instructions

Return curated high-conviction options flow signals for a date range. These are the strongest setups filtered by long streaks, large premium, and screener confluence. Each signal includes performance tracking (max_high_pct, max_drawdown_pct). Use when the user asks 'what are today's signals' or 'show me bullish setups from last week'. If date_from/date_to omitted, returns last 60 days. Returns { count, signals: [...] }. Tier: Pro only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
date_fromNoStart date (YYYY-MM-DD)
date_toNoEnd date (YYYY-MM-DD)

Implementation Reference

  • Handler function that parses input, builds a cache key, and proxies the request to GET /options-flow/signals with optional date_from/date_to query parameters.
    export async function handleGetOptionsFlowSignals(
      ctx: McpContext,
      rawArgs: unknown
    ): Promise<unknown> {
      const args = GetOptionsFlowSignalsInputSchema.parse(rawArgs);
      const key = `options-flow:signals:${args.date_from || "default"}:${args.date_to || "default"}`;
      return ctx.cache.wrap(key, 300_000, () =>
        ctx.apiClient.get("/options-flow/signals", {
          date_from: args.date_from,
          date_to: args.date_to,
        })
      );
    }
  • Zod schema defining the input for get_options_flow_signals: optional date_from and date_to fields validated as YYYY-MM-DD strings.
    export const GetOptionsFlowSignalsInputSchema = z.object({
      date_from: z.string().regex(dateRegex).optional().describe("Start date (YYYY-MM-DD)"),
      date_to: z.string().regex(dateRegex).optional().describe("End date (YYYY-MM-DD)"),
    });
  • Tool registration object with name, description, input schema, and read-only annotations, exported as part of the optionsFlowTools array.
    {
      name: "get_options_flow_signals",
      description:
        "Return curated high-conviction options flow signals for a date range. These are the strongest setups filtered by long streaks, large premium, and screener confluence. Each signal includes performance tracking (max_high_pct, max_drawdown_pct). Use when the user asks 'what are today's signals' or 'show me bullish setups from last week'. If date_from/date_to omitted, returns last 60 days. Returns { count, signals: [...] }. Tier: Pro only.",
      inputSchema: z.toJSONSchema(GetOptionsFlowSignalsInputSchema) as Tool["inputSchema"],
      annotations: READ_ONLY_ANNOTATIONS,
    },
  • Handler mapping in the HANDLERS record that wires the tool name to the handler function.
      get_options_flow_signals: (ctx, args) => handleGetOptionsFlowSignals(ctx, args),
      get_unusual_options_activity: (ctx, args) => handleGetUnusualOptionsActivity(ctx, args),
      get_stock_info: (ctx, args) => handleGetStockInfo(ctx, args),
      get_candles: (ctx, args) => handleGetCandles(ctx, args),
      get_stock_report: (ctx, args) => handleGetStockReport(ctx, args),
      search_setups: (ctx, args) => handleSearchSetups(ctx, args),
      get_market_momentum: (ctx, args) => handleGetMarketMomentum(ctx, args),
      get_trends: (ctx, args) => handleGetTrends(ctx, args),
      get_trend_connections: (ctx, args) => handleGetTrendConnections(ctx, args),
      explain_concept: (ctx, args) => handleExplainConcept(ctx, args),
    };
  • Import of handleGetOptionsFlowSignals from the optionsFlow module into the main tools registry.
    handleGetOptionsFlowSignals,
Behavior5/5

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

Annotations confirm readOnly and idempotent. Description adds valuable context: default to last 60 days if dates omitted, includes performance tracking fields, and restricts to Pro tier. No contradictions with annotations.

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?

Extremely concise: two sentences capture purpose, usage, defaults, and tier restriction. Every sentence adds value, and the structure is front-loaded with the core function.

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 output schema, the description clearly outlines the return structure (count, signals array). Defaults, performance tracking, and tier restrictions are covered. Completely adequate for an agent to use 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?

Schema describes date parameters with format. Description adds default behavior (60 days) which is not in schema. Since schema coverage is 100%, the description adds useful extra context beyond the schema.

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?

Clearly states it returns 'curated high-conviction options flow signals for a date range' with specific filtering criteria. Distinguishes from siblings like get_options_flow_overview and get_options_flow_timeline by highlighting the curated and high-conviction nature.

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 usage examples: 'what are today's signals' or 'show me bullish setups from last week'. This gives clear guidance on when to invoke the tool, effectively differentiating it from broader overview tools.

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/stockmarketscan/mcp-server'

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