Skip to main content
Glama

list_strategies

List available trading strategies with live performance data. Shows strategy name, market, total return, drawdown, and recent returns.

Instructions

List all available trading strategies with live performance data. Returns strategy name, market (US/China), total return, drawdown, and recent returns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The full implementation of the list_strategies tool handler. It calls the 'getProducts' API via callAPI, maps the response data to a structured format (productId, name, market, totalReturn, metricsYearLabel, maxDrawdown, recent1dReturn, recent30dReturn, status), and returns it as JSON text.
    // ── Tool: list_strategies ────────────────────────────────────
    
    server.tool(
      "list_strategies",
      "List all available trading strategies with live performance data. Returns strategy name, market (US/China), total return, drawdown, and recent returns.",
      {},
      async () => {
        const res = (await callAPI("getProducts")) as {
          code: number;
          data: Record<string, unknown>[];
        };
        if (res.code !== 0 || !Array.isArray(res.data)) {
          return { content: [{ type: "text" as const, text: "Failed to fetch strategies" }] };
        }
    
        const strategies = res.data.map((p) => ({
          productId: p.productId,
          name: p.name,
          market: p.market || "—",
          totalReturn: p.totalReturn ?? p.totalReturn5Y ?? null,
          metricsYearLabel: p.metricsYearLabel || null,
          maxDrawdown: p.maxDrawdown ?? null,
          recent1dReturn: p.recent1dReturn ?? null,
          recent30dReturn: p.recent30dReturn ?? null,
          status: p.status,
        }));
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(strategies, null, 2),
            },
          ],
        };
      }
    );
  • src/index.ts:51-85 (registration)
    Registration of the 'list_strategies' tool on the McpServer via server.tool() within the registerTools function. No input schema (empty object) because no parameters are needed.
    server.tool(
      "list_strategies",
      "List all available trading strategies with live performance data. Returns strategy name, market (US/China), total return, drawdown, and recent returns.",
      {},
      async () => {
        const res = (await callAPI("getProducts")) as {
          code: number;
          data: Record<string, unknown>[];
        };
        if (res.code !== 0 || !Array.isArray(res.data)) {
          return { content: [{ type: "text" as const, text: "Failed to fetch strategies" }] };
        }
    
        const strategies = res.data.map((p) => ({
          productId: p.productId,
          name: p.name,
          market: p.market || "—",
          totalReturn: p.totalReturn ?? p.totalReturn5Y ?? null,
          metricsYearLabel: p.metricsYearLabel || null,
          maxDrawdown: p.maxDrawdown ?? null,
          recent1dReturn: p.recent1dReturn ?? null,
          recent30dReturn: p.recent30dReturn ?? null,
          status: p.status,
        }));
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(strategies, null, 2),
            },
          ],
        };
      }
    );
  • Input schema for list_strategies is an empty object {} — the tool takes no parameters.
    {},
  • The callAPI helper used by the list_strategies handler to POST to the 'getProducts' endpoint at https://www.quanttogo.com.
    async function callAPI(fn: string, body: Record<string, unknown> = {}): Promise<unknown> {
      const resp = await fetch(`${API_BASE}/${fn}`, {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify(body),
      });
      if (!resp.ok) throw new Error(`API ${fn} returned ${resp.status}`);
      return resp.json();
    }
Behavior4/5

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

With no annotations, the description discloses a read-like operation (list all) and the return data. It could explicitly state it's non-destructive, but the intent is clear.

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?

Two concise sentences front-load the main action and list return fields without waste.

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?

For a parameterless list-all tool, the description fully covers what it does and the output structure, compensating for missing output schema.

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

Parameters5/5

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

No parameters exist; schema coverage is 100%. The description adds no redundancy and correctly implies no input needed.

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?

The description clearly states the tool lists all strategies with live performance data and specifies the output fields (name, market, returns, drawdown), distinguishing it from siblings like compare_strategies or get_strategy_performance.

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

Usage Guidelines3/5

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

The description implies listing all strategies but does not explicitly guide when to use this tool over alternatives or mention any context or exclusions.

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/QuantToGo/quanttogo-mcp'

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