Skip to main content
Glama

deep-research

Perform comprehensive research on complex topics using expert analysis with detailed facts, in-depth analysis, and cited sources. Get structured results for thorough investigation needs.

Instructions

Perform comprehensive deep research on any topic using AgentOracle Sonar Pro. Returns expert-level analysis with 10-15 detailed facts, in-depth analysis paragraph, cited sources, and confidence score. Costs $0.10 USDC per query via x402 on Base mainnet. Use for complex topics requiring thorough analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language research question for deep analysis. Examples: 'Comprehensive analysis of x402 protocol adoption and market impact', 'Detailed comparison of AI agent frameworks in 2026 with pros and cons'

Implementation Reference

  • The 'deep-research' tool is registered and implemented directly in src/index.ts using the server.tool() method, which defines the tool schema and handler logic.
    server.tool(
      "deep-research",
      "Perform comprehensive deep research on any topic using AgentOracle Sonar Pro. Returns expert-level analysis with 10-15 detailed facts, in-depth analysis paragraph, cited sources, and confidence score. Costs $0.10 USDC per query via x402 on Base mainnet. Use for complex topics requiring thorough analysis.",
      {
        query: z
          .string()
          .max(4000)
          .describe(
            "Natural language research question for deep analysis. Examples: 'Comprehensive analysis of x402 protocol adoption and market impact', 'Detailed comparison of AI agent frameworks in 2026 with pros and cons'"
          ),
      },
      async ({ query }) => {
        try {
          const response = await fetch(DEEP_RESEARCH_ENDPOINT, {
            method: "POST",
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify({ query }),
          });
    
          if (response.status === 402) {
            const paymentInfo = await response.json();
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify(
                    {
                      status: "payment_required",
                      message: "This deep research query requires a $0.10 USDC payment on Base mainnet via x402 protocol.",
                      instructions: "Use an x402-compatible client to sign a USDC payment and include it in the X-PAYMENT header.",
                      payment_details: paymentInfo,
                      endpoint: DEEP_RESEARCH_ENDPOINT,
                      manifest: MANIFEST_ENDPOINT,
                    },
                    null,
                    2
                  ),
                },
              ],
            };
          }
    
          if (!response.ok) {
            const errorData = await response.json().catch(() => ({}));
            return {
              content: [{ type: "text", text: `Deep research request failed (HTTP ${response.status}): ${JSON.stringify(errorData)}` }],
              isError: true,
            };
          }
    
          const data = await response.json();
          return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          return {
            content: [{ type: "text", text: `Error connecting to AgentOracle: ${error instanceof Error ? error.message : String(error)}` }],
            isError: true,
          };
        }
      }
    );

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/TKCollective/agentoracle-mcp'

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