Skip to main content
Glama

fetchFullContent

Retrieves complete content from preview search results to access full articles, documents, or web pages in markdown, text, or HTML formats.

Instructions

Busca conteúdo completo de um resultado anterior de RAG obtido em contentMode=preview

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentHandleYesHandle do conteúdo obtido em contentMode=preview da ferramenta rag
outputFormatNoFormato de saída do conteúdomarkdown

Implementation Reference

  • Core execution logic for the fetchFullContent tool. Decodes the content handle to retrieve URL, fetches from cache, handles errors, and returns formatted content based on outputFormat.
    export async function fetchFullContent(
      params: FetchFullContentParams
    ): Promise<FetchResult> {
      const { contentHandle, outputFormat = "markdown" } = params;
    
      const url = decodeContentHandle(contentHandle);
      if (!url) {
        return {
          url: "",
          title: "",
          error: "Invalid contentHandle format. Ensure it was generated by rag() tool.",
        };
      }
    
      const cached = getFromCache(url);
      if (!cached) {
        return {
          url,
          title: "",
          error: `Content not found in cache. Cache TTL is 1 hour. Please run rag() again to re-fetch and cache the content.`,
        };
      }
    
      const result: FetchResult = {
        url: cached.url,
        title: cached.title,
        cached: true,
        contentLength:
          outputFormat === "markdown"
            ? cached.markdown.length
            : cached.content.length,
      };
    
      if (outputFormat === "markdown") {
        result.markdown = cached.markdown;
      } else if (outputFormat === "text") {
        result.text = cached.content;
      } else if (outputFormat === "html") {
        result.html = cached.content;
      }
    
      return result;
    }
  • src/index.ts:61-80 (registration)
    MCP server tool registration for 'fetchFullContent', including description, Zod input schema, and wrapper handler that invokes the core fetchFullContent function and formats the MCP response.
    server.tool(
      "fetchFullContent",
      "Busca conteúdo completo de um resultado anterior de RAG obtido em contentMode=preview",
      {
        contentHandle: z
          .string()
          .min(1)
          .describe("Handle do conteúdo obtido em contentMode=preview da ferramenta rag"),
        outputFormat: z
          .enum(["markdown", "text", "html"])
          .default("markdown")
          .describe("Formato de saída do conteúdo"),
      },
      async (params) => {
        const result = await fetchFullContent(params);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
        };
      }
    );
  • TypeScript interface defining the output structure of the fetchFullContent function.
    interface FetchResult {
      url: string;
      title: string;
      markdown?: string;
      text?: string;
      html?: string;
      contentLength?: number;
      cached?: boolean;
      error?: string;
    }
  • TypeScript interface defining the input parameters for the fetchFullContent function.
    interface FetchFullContentParams {
      contentHandle: string;
      outputFormat?: "markdown" | "text" | "html";
    }
  • Zod schema defining the input validation for the MCP tool registration.
    {
      contentHandle: z
        .string()
        .min(1)
        .describe("Handle do conteúdo obtido em contentMode=preview da ferramenta rag"),
      outputFormat: z
        .enum(["markdown", "text", "html"])
        .default("markdown")
        .describe("Formato de saída do conteúdo"),
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool fetches full content, implying a read operation, but doesn't mention any behavioral traits like error handling, performance characteristics, or whether it requires specific permissions. For a tool with no annotation coverage, this is a significant gap, though it at least clarifies the operation type.

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?

The description is a single, efficient sentence in Portuguese that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy to understand quickly. Every part of the sentence earns its place by specifying the action, resource, and context.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It explains what the tool does and its context (post-RAG retrieval), but lacks details on output format, error cases, or integration with siblings. Without an output schema, it should ideally mention return values, but it doesn't, leaving gaps in completeness.

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%, so the schema already documents both parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain 'contentHandle' further or provide examples). With high schema coverage, the baseline is 3, as the description doesn't compensate but doesn't detract either.

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: 'Busca conteúdo completo de um resultado anterior de RAG obtido em contentMode=preview' (Fetches full content from a previous RAG result obtained in contentMode=preview). It specifies the verb 'busca' (fetches) and the resource 'conteúdo completo' (full content), and distinguishes it from the sibling 'rag' tool by indicating it works on previous results from that tool. However, it doesn't explicitly differentiate from 'scrape' or 'screenshot' tools, keeping it at 4 rather than 5.

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 when to use this tool: after obtaining a RAG result in contentMode=preview, to get the full content. It distinguishes from the 'rag' sibling by indicating this is for follow-up retrieval. However, it doesn't provide explicit alternatives or exclusions (e.g., when not to use it vs. 'scrape'), and no prerequisites are mentioned, so it's at an implied usage level.

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/alucardeht/isis-mcp'

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