searchSymbols
Find trading symbols by name or criteria across stocks, options, futures, and forex to identify assets for market analysis and order placement.
Instructions
Search for symbols (Note: Symbol search not available in TradeStation v3 API - use getSymbolDetails instead with known symbols)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| criteria | Yes | Search criteria | |
| type | No | Symbol type filter | all |
Implementation Reference
- src/index.ts:336-365 (handler)The handler function for the 'searchSymbols' tool, registered via server.tool(). This is a placeholder implementation that returns an error message explaining that symbol search is not supported by the TradeStation v3 API and suggests alternatives.server.tool( "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 }; } } );
- src/index.ts:85-90 (schema)Zod schema defining the input parameters for the searchSymbols tool: criteria (string) and type (enum with default 'all').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:336-365 (registration)Registration of the 'searchSymbols' tool using McpServer's tool() method, including name, description, schema, and inline handler.server.tool( "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 }; } } );