Skip to main content
Glama
OctagonAI

mcp-octagon

Official
by OctagonAI

octagon-deep-research-agent

Aggregate and synthesize investment research from multiple data sources to analyze market intelligence, competitive landscapes, and financial impacts.

Instructions

[PUBLIC & PRIVATE MARKET INTELLIGENCE] A comprehensive agent that can utilize multiple sources for deep research analysis. Capabilities: Aggregate research across multiple data sources, synthesize information, and provide comprehensive investment research. Best for: Investment research questions requiring up-to-date aggregated information from the web. Example queries: 'Research the financial impact of Apple's privacy changes on digital advertising companies' revenue and margins', 'Analyze the competitive landscape in the cloud computing sector, focusing on AWS, Azure, and Google Cloud margin and growth trends', 'Investigate the factors driving electric vehicle adoption and their impact on battery supplier financials'.

Input Schema

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

Implementation Reference

  • src/index.ts:168-205 (registration)
    Registration of the 'octagon-deep-research-agent' MCP tool, including description, input schema, and inline handler function.
    server.tool(
      "octagon-deep-research-agent",
      "[PUBLIC & PRIVATE MARKET INTELLIGENCE] A comprehensive agent that can utilize multiple sources for deep research analysis. Capabilities: Aggregate research across multiple data sources, synthesize information, and provide comprehensive investment research. Best for: Investment research questions requiring up-to-date aggregated information from the web. Example queries: 'Research the financial impact of Apple's privacy changes on digital advertising companies' revenue and margins', 'Analyze the competitive landscape in the cloud computing sector, focusing on AWS, Azure, and Google Cloud margin and growth trends', 'Investigate the factors driving electric vehicle adoption and their impact on battery supplier financials'.",
      {
        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-deep-research-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 Deep Research agent:", error);
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: `Error: Failed to process deep research query. ${error}`,
              },
            ],
          };
        }
      }
    );
  • Handler function that creates a chat completion using the 'octagon-deep-research-agent' model from Octagon API, processes the streaming response, and returns it as MCP content.
    async ({ prompt }: PromptParams) => {
      try {
        const response = await octagonClient.chat.completions.create({
          model: "octagon-deep-research-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 Deep Research agent:", error);
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error: Failed to process deep research query. ${error}`,
            },
          ],
        };
      }
  • Zod input schema defining the 'prompt' parameter for the tool.
    {
      prompt: z.string().describe("Your natural language query or request for the agent"),
    },
  • Shared utility function to process and concatenate streaming responses from the Octagon API, used by the tool handler.
    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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions capabilities like aggregation and synthesis, but lacks critical behavioral details such as rate limits, authentication requirements, data freshness guarantees, or potential costs. The description doesn't contradict annotations (since none exist), but provides insufficient operational context for a tool performing complex research.

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 moderately structured with capability lists, usage guidance, and examples, but could be more front-loaded. Some sentences like 'Capabilities: Aggregate research across multiple data sources, synthesize information, and provide comprehensive investment research' could be more efficiently integrated. The bracketed '[PUBLIC & PRIVATE MARKET INTELLIGENCE]' adds little value and disrupts flow.

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?

For a complex research tool with no annotations and no output schema, the description is incomplete. It doesn't explain what format the research results will take, whether they include citations or sources, how comprehensive the aggregation is, or any limitations on research scope. The examples help but don't compensate for missing behavioral and output context that an agent would need to use this tool effectively.

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 input schema has 100% description coverage for its single parameter ('prompt'), which is well-documented as 'Your natural language query or request for the agent'. The description adds value by providing example queries that illustrate appropriate prompt content, but doesn't add significant semantic information beyond what the schema already provides. With high schema coverage, the baseline score of 3 is appropriate.

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 as a comprehensive research agent that aggregates, synthesizes, and provides investment research using multiple data sources. It specifies the verb ('utilize multiple sources for deep research analysis') and resource ('investment research questions'), but doesn't explicitly differentiate from sibling tools like 'octagon-agent' or 'octagon-scraper-agent' beyond mentioning its comprehensive nature.

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 for when to use this tool: 'Best for: Investment research questions requiring up-to-date aggregated information from the web' and includes example queries. However, it doesn't explicitly state when NOT to use it or mention alternatives like the sibling tools, leaving some ambiguity about tool selection.

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