Skip to main content
Glama

TradeStation MCP Server

by maven81g

searchSymbols

Find trading symbols by search criteria and filter by asset type to identify securities for market analysis and trading decisions.

Instructions

Search for symbols (Note: Symbol search not available in TradeStation v3 API - use getSymbolDetails instead with known symbols)

Input Schema

NameRequiredDescriptionDefault
criteriaYesSearch criteria
typeNoSymbol type filterall

Input Schema (JSON Schema)

{ "properties": { "criteria": { "description": "Search criteria", "type": "string" }, "type": { "default": "all", "description": "Symbol type filter", "enum": [ "stock", "option", "future", "forex", "all" ], "type": "string" } }, "required": [ "criteria" ], "type": "object" }

Implementation Reference

  • The inline handler function for the 'searchSymbols' MCP tool. It returns an error message explaining that symbol search is not supported in TradeStation API v3 and provides alternatives.
    async (args) => { try { const { criteria } = args; return { content: [ { type: "text", text: `Symbol search is not available in TradeStation API v3.\n\nAlternatives:\n1. Use getSymbolDetails with known symbols: "${criteria}"\n2. Use marketData to get quotes for known symbols\n3. For options, use getOptionExpirations and getOptionStrikes with the underlying symbol` } ], isError: true }; } catch (error: unknown) { return { content: [ { type: "text", text: `Failed to search symbols: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } }
  • Zod schema defining the input parameters (criteria and optional type filter) for the searchSymbols tool.
    const searchSymbolsSchema = { criteria: z.string().describe('Search criteria'), type: z.enum(['stock', 'option', 'future', 'forex', 'all']) .default('all') .describe('Symbol type filter') };
  • src/index.ts:337-365 (registration)
    MCP server tool registration for 'searchSymbols', including name, description, schema, and inline handler.
    "searchSymbols", "Search for symbols (Note: Symbol search not available in TradeStation v3 API - use getSymbolDetails instead with known symbols)", searchSymbolsSchema, async (args) => { try { const { criteria } = args; return { content: [ { type: "text", text: `Symbol search is not available in TradeStation API v3.\n\nAlternatives:\n1. Use getSymbolDetails with known symbols: "${criteria}"\n2. Use marketData to get quotes for known symbols\n3. For options, use getOptionExpirations and getOptionStrikes with the underlying symbol` } ], isError: true }; } catch (error: unknown) { return { content: [ { type: "text", text: `Failed to search symbols: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } );
  • Alternative inline handler in index.js version that attempts to call a symbol search API endpoint.
    async ({ arguments: args }) => { try { const { criteria, type } = args; const userId = args.userId; // You might need to pass this differently let endpoint = `/marketdata/symbols/search/${encodeURIComponent(criteria)}`; if (type && type !== 'all') { endpoint += `?type=${type}`; } const symbols = await makeAuthenticatedRequest(userId, endpoint); return { content: [ { type: "text", text: JSON.stringify(symbols, null, 2) } ] }; } catch (error) { return { content: [ { type: "text", text: `Failed to search symbols: ${error.message}` } ], isError: true }; } }
  • Zod schema for searchSymbols in the index.js version.
    const searchSymbolsSchema = z.object({ criteria: z.string().describe('Search criteria'), type: z.enum(['stock', 'option', 'future', 'forex', 'all']) .default('all') .describe('Symbol type filter') });

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/maven81g/tradestation_mcp'

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