Skip to main content
Glama
OctagonAI

mcp-octagon

Official
by OctagonAI

octagon-agent

Analyze market intelligence by orchestrating agents to combine SEC filings, earnings calls, financial metrics, stock data, institutional holdings, private company research, funding analysis, M&A transactions, investor intelligence, and debt analysis for holistic insights across public and private markets.

Instructions

[COMPREHENSIVE MARKET INTELLIGENCE] Orchestrates all agents for comprehensive market intelligence analysis. Capabilities: Combines insights from SEC filings, earnings calls, financial metrics, stock data, institutional holdings, private company research, funding analysis, M&A transactions, investor intelligence, and debt analysis to provide holistic market intelligence. Best for: Complex research requiring multiple data sources and comprehensive analysis across public and private markets. Example queries: 'Retrieve year-over-year growth in key income-statement items for AAPL, limited to 5 records and filtered by period FY', 'Analyze the latest 10-K filing for AAPL and extract key financial metrics and risk factors', 'Retrieve the daily closing prices for AAPL over the last 30 days', 'Analyze AAPL's latest earnings call transcript and extract key insights about future guidance', 'Provide a comprehensive overview of Stripe, including its business model and key metrics', 'Retrieve the funding history for Stripe, including all rounds and investors'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesYour natural language query or request for the agent

Implementation Reference

  • The handler function that executes the 'octagon-agent' tool logic. It invokes the Octagon API's 'octagon-agent' model with the provided prompt, processes the streaming response using the processStreamingResponse helper, and returns the result as MCP content or an error.
      try {
        const response = await octagonClient.chat.completions.create({
          model: "octagon-agent",
          messages: [{ role: "user", content: prompt }],
          stream: true,
          metadata: { tool: "mcp" }
        });
    
        const result = await processStreamingResponse(response);
        return {
          content: [
            {
              type: "text",
              text: result,
            },
          ],
        };
      } catch (error) {
        console.error("Error calling Octagon orchestration agent:", error);
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error: Failed to process comprehensive market intelligence query. ${error}`,
            },
          ],
        };
      }
    }
  • The Zod input schema for the 'octagon-agent' tool, defining a single 'prompt' parameter.
      prompt: z.string().describe("Your natural language query or request for the agent"),
    },
    async ({ prompt }: PromptParams) => {
  • src/index.ts:89-125 (registration)
    The MCP server.tool registration for the 'octagon-agent' tool, specifying name, description, input schema, and handler function.
      "octagon-agent",
      "[COMPREHENSIVE MARKET INTELLIGENCE] Orchestrates all agents for comprehensive market intelligence analysis. Capabilities: Combines insights from SEC filings, earnings calls, financial metrics, stock data, institutional holdings, private company research, funding analysis, M&A transactions, investor intelligence, and debt analysis to provide holistic market intelligence. Best for: Complex research requiring multiple data sources and comprehensive analysis across public and private markets. Example queries: 'Retrieve year-over-year growth in key income-statement items for AAPL, limited to 5 records and filtered by period FY', 'Analyze the latest 10-K filing for AAPL and extract key financial metrics and risk factors', 'Retrieve the daily closing prices for AAPL over the last 30 days', 'Analyze AAPL's latest earnings call transcript and extract key insights about future guidance', 'Provide a comprehensive overview of Stripe, including its business model and key metrics', 'Retrieve the funding history for Stripe, including all rounds and investors'.",
      {
        prompt: z.string().describe("Your natural language query or request for the agent"),
      },
      async ({ prompt }: PromptParams) => {
        try {
          const response = await octagonClient.chat.completions.create({
            model: "octagon-agent",
            messages: [{ role: "user", content: prompt }],
            stream: true,
            metadata: { tool: "mcp" }
          });
    
          const result = await processStreamingResponse(response);
          return {
            content: [
              {
                type: "text",
                text: result,
              },
            ],
          };
        } catch (error) {
          console.error("Error calling Octagon orchestration agent:", error);
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: `Error: Failed to process comprehensive market intelligence query. ${error}`,
              },
            ],
          };
        }
      }
    );
  • Helper function used by the 'octagon-agent' handler (and others) to process streaming responses from the Octagon API chat completions.
    async function processStreamingResponse(stream: any): Promise<string> {
      let fullResponse = "";
      let citations: any[] = [];
    
      try {
        // Process the streaming response
        for await (const chunk of stream) {
          // For Chat Completions API
          if (chunk.choices && chunk.choices[0]?.delta?.content) {
            fullResponse += chunk.choices[0].delta.content;
    
            // Check for citations in the final chunk
            if (chunk.choices[0]?.finish_reason === "stop" && chunk.choices[0]?.citations) {
              citations = chunk.choices[0].citations;
            }
          }
    
          // For Responses API
          if (chunk.type === "response.output_text.delta") {
            fullResponse += chunk.text?.delta || "";
          }
        }
    
        return fullResponse;
      } catch (error) {
        console.error("Error processing streaming response:", error);
        throw error;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. While it mentions the tool 'orchestrates all agents' and lists data sources, it doesn't disclose critical behavioral traits like whether this is a read-only operation, potential rate limits, authentication requirements, response format, or error handling. The description focuses on capabilities rather than operational behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with purpose and capabilities, but becomes verbose with the lengthy list of data sources and multiple example queries. While all content is relevant, the example section could be more concise. The structure is logical but could be more efficiently organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a complex orchestration tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns, how results are structured, error conditions, or operational constraints. The example queries help but don't compensate for the lack of behavioral and output documentation needed for effective agent use.

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?

Schema description coverage is 100% with the single 'prompt' parameter well-documented as 'Your natural language query or request for the agent.' The description adds value through example queries that illustrate what constitutes a good prompt, but doesn't provide additional parameter-specific guidance beyond what the schema already states.

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 'orchestrates all agents for comprehensive market intelligence analysis' and lists specific capabilities like SEC filings, earnings calls, financial metrics, etc. It distinguishes from siblings by emphasizing comprehensive multi-source analysis, though it doesn't explicitly name the sibling tools for comparison.

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

Usage Guidelines4/5

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

The description provides clear context with 'Best for: Complex research requiring multiple data sources and comprehensive analysis across public and private markets.' It includes example queries that illustrate appropriate use cases. However, it doesn't explicitly state when NOT to use this tool or directly compare it to the sibling tools by name.

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/OctagonAI/octagon-mcp-server'

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