Skip to main content
Glama

save_mcp_docs

Store MCP documentation securely by saving text with a unique key for easy retrieval and future reference, enhancing project organization on the MCP Maker server.

Instructions

Saves MCP documentation text directly and stores it for future reference

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_textYes
keyYes

Implementation Reference

  • The core handler function for the save_mcp_docs tool. Validates input using Zod schema, initializes documentation storage if needed, calls saveDocumentation helper, and returns success or error response.
    export async function saveMcpDocs(
      options: DocOptions
    ): Promise<{ success: boolean; message: string }> {
      try {
        // Validate options
        const validatedOptions = saveDocsSchema.parse(options);
    
        // Initialize docs storage if it doesn't exist yet
        await initDocsStorage();
    
        // Save the documentation
        await saveDocumentation(validatedOptions.key, validatedOptions.doc_text);
    
        return {
          success: true,
          message: `Documentation saved successfully with key: ${validatedOptions.key}`,
        };
      } catch (error: any) {
        console.error(chalk.red("Error saving documentation:"), error);
        return {
          success: false,
          message: `Error saving documentation: ${error.message || String(error)}`,
        };
      }
    }
  • src/server.ts:114-128 (registration)
    Registers the save_mcp_docs tool with the MCP server, including name, description, input schema validation, and delegation to the saveMcpDocs handler.
    // Register the save_mcp_docs tool
    server.tool(
      "save_mcp_docs",
      "Saves MCP documentation text directly and stores it for future reference",
      {
        key: z.string().min(1),
        doc_text: z.string().min(1),
      },
      async (params: DocOptions) => {
        const result = await saveMcpDocs(params);
        return {
          content: [{ type: "text", text: result.message }],
        };
      }
    );
  • Zod schema defining the input structure for save_mcp_docs (key and doc_text), used for validation in the handler.
    export const saveDocsSchema = z.object({
      key: z.string().min(1),
      doc_text: z.string().min(1),
    });
  • Helper utility that persists the documentation content to a Markdown file in the .docs directory, called by the handler.
    export const saveDocumentation = async (
      key: string,
      docText: string
    ): Promise<void> => {
      try {
        const filePath = path.join(DOCS_DIR, `${key}.md`);
        await writeFile(filePath, docText);
        console.log(chalk.green(`Documentation saved: ${key}`));
      } catch (error) {
        console.error(chalk.red(`Error saving documentation ${key}:`), error);
        throw error;
      }
    };
  • Helper utility that ensures the documentation storage directory (.docs) exists, called by the handler.
    export const initDocsStorage = async (): Promise<void> => {
      await ensureDir(DOCS_DIR);
      console.log(chalk.green("Documentation storage initialized"));
    };
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it 'saves' and 'stores' without detailing permissions, persistence mechanisms, error handling, or response format. It lacks critical behavioral context for a write operation.

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 with no wasted words, clearly front-loaded with the core action. Every word contributes to the tool's purpose.

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 write tool with no annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't address how storage works, what 'key' represents, or what happens on success/failure, leaving significant gaps for agent usage.

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 0%, so the description must compensate but only implies parameters through 'MCP documentation text' and 'stores it', without explaining 'key' or 'doc_text' meanings. It adds minimal value beyond the schema's property names.

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 action ('saves') and resource ('MCP documentation text'), specifying it stores for future reference. However, it doesn't differentiate from siblings like 'create_resource_template' or 'generate_mcp_boilerplate' which might also involve saving documentation-related content.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like 'create_resource_template' or 'search_mcp_docs'. The description implies storage for reference but doesn't specify use cases, prerequisites, or exclusions.

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

Related 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/CaptainCrouton89/mcp-maker'

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