getSymbolDetails
Retrieve detailed market information for trading symbols including quotes, specifications, and trading parameters to support informed investment decisions.
Instructions
Get detailed symbol information
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbols | Yes | Single symbol or comma-separated list of symbols |
Input Schema (JSON Schema)
{
"properties": {
"symbols": {
"description": "Single symbol or comma-separated list of symbols",
"type": "string"
}
},
"required": [
"symbols"
],
"type": "object"
}
Implementation Reference
- src/index.ts:129-131 (schema)Zod schema defining the input parameters for the getSymbolDetails tool: a string of single or comma-separated symbols.const symbolDetailsSchema = { symbols: z.string().describe('Single symbol or comma-separated list of symbols') };
- src/index.ts:668-671 (registration)Registration of the getSymbolDetails tool with the MCP server, specifying name, description, and schema.server.tool( "getSymbolDetails", "Get detailed symbol information", symbolDetailsSchema,
- src/index.ts:672-700 (handler)Handler function that fetches symbol details from TradeStation API endpoint /marketdata/symbols/{symbols}, authenticates via bearer token, and returns JSON response or error.async (args) => { try { const { symbols } = args; const symbolDetails = await makeAuthenticatedRequest( `/marketdata/symbols/${encodeURIComponent(symbols)}` ); return { content: [ { type: "text", text: JSON.stringify(symbolDetails, null, 2) } ] }; } catch (error: unknown) { return { content: [ { type: "text", text: `Failed to fetch symbol details: ${error instanceof Error ? error.message : 'Unknown error'}` } ], isError: true }; } } );