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; } }

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