Skip to main content
Glama
michaeljiangmingfeng-debug

quanttogo-mcp-servers

get_trading_signals

Retrieve real-time BUY/SELL signals from quantitative strategies for informed trading decisions, including symbol, quantity, price, and strategy details.

Instructions

Get latest trading signals from live quantitative strategies. Returns real-time BUY/SELL signals with symbol, quantity, price, and strategy info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
strategyIdNoFilter by strategy ID
limitNoNumber of signals to return
statusNoFilter by signal statusall

Implementation Reference

  • Main handler implementation for get_trading_signals tool with full error handling, parameter processing, and response formatting
    server.tool(
      'get_trading_signals',
      'Get latest trading signals from live quantitative strategies. Returns real-time BUY/SELL signals with symbol, quantity, price, and strategy info.',
      {
        strategyId: z.string().optional().describe('Filter by strategy ID'),
        limit: z.number().min(1).max(100).default(20).describe('Number of signals to return'),
        status: z.enum(['pending', 'confirmed', 'skipped', 'all']).default('all').describe('Filter by signal status'),
      },
      async ({ strategyId, limit, status }) => {
        try {
          const params: Record<string, any> = { limit };
          if (strategyId) params.strategyId = strategyId;
          if (status && status !== 'all') params.status = status;
    
          const result = await client.getSignals(params);
    
          if (result.code !== 0) {
            return { content: [{ type: 'text', text: `Error: ${result.message || 'Failed to fetch signals'}` }] };
          }
    
          const signals = result.data || [];
          const formatted = signals.map((s: any) => ({
            id: s._id,
            strategy: s.strategyName || s.strategyId,
            symbol: s.symbol,
            action: s.action,
            quantity: s.quantity,
            price: s.price,
            time: s.timestamp,
            status: s.status,
            source: s.source,
          }));
    
          return {
            content: [{
              type: 'text',
              text: JSON.stringify({ signals: formatted, count: formatted.length }, null, 2),
            }],
          };
        } catch (error: any) {
          return { content: [{ type: 'text', text: `Error fetching signals: ${error.message}` }] };
        }
      }
    );
  • Alternative handler implementation for get_trading_signals in HTTP server mode with simplified response formatting
    server.tool(
      'get_trading_signals',
      'Get latest trading signals from live quantitative strategies',
      {
        strategyId: z.string().optional().describe('Filter by strategy ID'),
        limit: z.number().min(1).max(100).default(20).describe('Number of signals'),
        status: z.enum(['pending', 'confirmed', 'skipped', 'all']).default('all').describe('Signal status filter'),
      },
      async ({ strategyId, limit, status }) => {
        const params: Record<string, any> = { limit };
        if (strategyId) params.strategyId = strategyId;
        if (status && status !== 'all') params.status = status;
        const result = await client.getSignals(params);
        return { content: [{ type: 'text', text: JSON.stringify(result.data || [], null, 2) }] };
      }
    );
  • API client method that makes the actual HTTP request to fetch trading signals from the QuantToGo backend
    async getSignals(params: { strategyId?: string; limit?: number; status?: string } = {}) {
      return this.call('/getTradingNotifications', params);
    }
  • Type definition for TradingSignal interface that defines the structure of signal data returned by the API
    export interface TradingSignal {
      _id: string;
      signalId?: string;
      strategyId: string;
      strategyName?: string;
      symbol: string;
      action: 'BUY' | 'SELL' | 'HOLD';
      quantity: number;
      price?: number;
      timestamp: string;
      source: 'QC' | 'JQ';
      status: 'pending' | 'confirmed' | 'skipped' | 'expired';
      userDecision?: 'EXECUTE' | 'SKIP';
      accountType?: string;
      currency?: string;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions 'real-time' and 'latest,' implying timeliness, but doesn't disclose behavioral traits such as rate limits, authentication needs, data freshness, or whether it's a read-only operation. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 appropriately sized and front-loaded: the first sentence states the core purpose, and the second adds key details about returns. Every sentence earns its place by providing essential information without redundancy or fluff, making it efficient and well-structured.

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?

Given the tool's complexity (3 parameters, no output schema, no annotations), the description is moderately complete. It covers the purpose and return values but lacks details on behavioral aspects and usage context. Without annotations or output schema, more information on error handling or response format would improve completeness, but it's adequate for a basic read operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all parameters (strategyId, limit, status) with descriptions. The description adds no additional meaning beyond what the schema provides, such as explaining how filters interact or the significance of 'real-time' in parameter context. Baseline 3 is appropriate as the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get latest trading signals from live quantitative strategies.' It specifies the verb ('Get') and resource ('trading signals'), and mentions the source ('live quantitative strategies'). However, it doesn't explicitly differentiate from sibling tools like 'confirm_signal' or 'get_signal_stats,' which would be needed for a score of 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'confirm_signal' or 'get_signal_stats.' It mentions 'real-time BUY/SELL signals' but doesn't clarify if this is for monitoring, analysis, or other contexts. No explicit when/when-not instructions or prerequisites are included.

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/michaeljiangmingfeng-debug/quanttogo-mcp-servers'

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