Skip to main content
Glama
VKneider

Slice.js Documentation MCP

by VKneider

get_llm_full_context

Retrieve the complete Slice.js documentation bundle to add comprehensive context for AI assistants, enabling thorough understanding of the framework's capabilities.

Instructions

Fetches the complete documentation bundle (~2000 lines, consumes considerable tokens but provides all documentation in one go). IMPORTANT: Ask the user for confirmation before executing this tool as it will add the entire Slice.js documentation to the context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main implementation of get_llm_full_context tool. Defines the tool with its name, description, empty parameters schema, and execute function that fetches and caches the complete llm.txt documentation from GitHub (~2000 lines).
    export const getLlmFullContextTool = {
      name: "get_llm_full_context",
      description: "Fetches the complete documentation bundle (~2000 lines, consumes considerable tokens but provides all documentation in one go). IMPORTANT: Ask the user for confirmation before executing this tool as it will add the entire Slice.js documentation to the context.",
      parameters: z.object({}),
      execute: async () => {
        const cached = getCached('llm.txt');
        if (cached) {
          console.error('[MCP] Returning cached llm.txt');
          return cached;
        }
    
        console.error('[MCP] Fetching llm.txt from GitHub');
        const url = `${BASE_URL}llm.txt`;
        try {
          const response = await fetch(url);
          if (!response.ok) throw new Error(`HTTP ${response.status}`);
          const content = await response.text();
          setCache('llm.txt', content);
          console.error('[MCP] Fetched and cached llm.txt, now populating individual doc cache');
    
          // Populate cache with individual docs from llm.txt
          const sections = content.split(/\n=== /).slice(1); // Skip first empty
          let populatedCount = 0;
          for (const section of sections) {
            const lines = section.split('\n');
            const filePath = lines[0].replace(' ===', ''); // e.g., 'markdown/getting-started.md'
            const docContent = lines.slice(1).join('\n').trim();
            if (filePath && docContent) {
              // Compute cache key as doc id: remove 'markdown/' prefix and '.md' suffix
              const docId = filePath.replace(/^markdown\//, '').replace(/\.md$/, '');
              setCache(docId, docContent);
              populatedCount++;
            }
          }
          console.error(`[MCP] Populated cache with ${populatedCount} individual docs`);
    
          // Update DOCS_STRUCTURE if already initialized
          if (isInitialized) {
            DOCS_STRUCTURE.length = 0; // Clear the array
            DOCS_STRUCTURE.push(...parseDocsFromLlmTxt(content));
            console.error(`[MCP] Updated DOCS_STRUCTURE to ${DOCS_STRUCTURE.length} documents from llm.txt`);
          }
    
          return content;
        } catch (error) {
          console.error(`[MCP] Error fetching llm.txt: ${error}`);
          return `Error fetching llm.txt: ${error}`;
        }
      },
    };
  • Schema definition using Zod with empty parameters object, indicating this tool takes no input parameters.
    parameters: z.object({}),
  • src/index.ts:17-17 (registration)
    Tool registration where getLlmFullContextTool is added to the FastMCP server instance.
    server.addTool(getLlmFullContextTool);
  • Cache retrieval helper function getCached used by the tool to check for cached llm.txt content.
    export function getCached(key: string): string | null {
      const cached = cache.get(key);
      if (!cached) return null;
    
      if (Date.now() - cached.timestamp > CACHE_TTL) {
        cache.delete(key);
        return null;
      }
    
      return cached.content;
    }
  • Cache storage helper function setCache used by the tool to cache the fetched llm.txt content and individual documentation sections.
    export function setCache(key: string, content: string): void {
      cache.set(key, { content, timestamp: Date.now() });
    }
Behavior4/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 effectively describes key traits: the output size (~2000 lines), token consumption ('consumes considerable tokens'), and the action of adding documentation to context. However, it lacks details on potential errors or rate limits, keeping it from a perfect score.

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 front-loaded with the core purpose, followed by critical usage instructions, all in two efficient sentences with zero wasted words. Every sentence earns its place by providing essential information.

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

Completeness4/5

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

Given the tool's complexity (no parameters, no output schema, no annotations), the description is largely complete, covering purpose, usage, and behavioral traits. However, it could be more complete by specifying the format of the returned documentation or any limitations, slightly reducing the score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter information is needed. The description adds value by explaining the tool's behavior and implications, but it could slightly enhance semantics by mentioning any implicit assumptions, such as the source of the documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('fetches') and resource ('complete documentation bundle'), distinguishing it from sibling tools like get_doc_content, list_docs, and search_docs by emphasizing the comprehensive nature of the retrieval.

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

Usage Guidelines5/5

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

It provides explicit guidance on when to use this tool (to get all documentation at once) and includes a crucial prerequisite: 'Ask the user for confirmation before executing this tool,' which helps differentiate it from alternatives that might be more targeted or less resource-intensive.

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/VKneider/slicejs-mcp'

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