Skip to main content
Glama

docs_build_static

Build static documentation websites for hosting on platforms like GitHub Pages, Netlify, and Vercel. Supports Docusaurus, MkDocs, and Sphinx frameworks to generate deployable sites from documentation directories.

Instructions

Build static website for online hosting (ready for GitHub Pages, Netlify, Vercel, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docsPathYesPath to documentation directory
frameworkYesDocumentation framework used
outputPathNoOutput path for built site (default: ./build)

Implementation Reference

  • The main handler function that executes the docs_build_static tool by returning framework-specific (Docusaurus, MkDocs, Sphinx) build instructions.
    export async function buildStatic(args: any) { const { docsPath, framework, outputPath } = args as BuildStaticArgs; const instructions: Record<string, string> = { docusaurus: `๐Ÿ—๏ธ Building Docusaurus Static Site: 1. Navigate to docs directory: cd ${docsPath} 2. Install dependencies (if not done): npm install 3. Build: npm run build 4. Output location: ${docsPath}/build 5. Test the build locally: npm run serve 6. Deploy to: - GitHub Pages: npm run deploy - Netlify: Drag & drop the 'build' folder - Vercel: Connect your repo`, mkdocs: `๐Ÿ—๏ธ Building MkDocs Static Site: 1. Navigate to project directory: cd ${docsPath} 2. Build: mkdocs build 3. Output location: ${docsPath}/site 4. Preview: cd site && python -m http.server 8000 5. Deploy to GitHub Pages: mkdocs gh-deploy`, sphinx: `๐Ÿ—๏ธ Building Sphinx Static Site: 1. Navigate to docs directory: cd ${docsPath} 2. Build HTML: make html 3. Output location: ${docsPath}/_build/html 4. Preview: cd _build/html && python -m http.server 8000 5. For ReadTheDocs: Connect your repository at readthedocs.org`, }; const instruction = instructions[framework] || "Framework not supported"; return { content: [ { type: "text", text: instruction, }, ], }; }
  • MCP tool definition including name, description, and input schema for docs_build_static.
    { name: "docs_build_static", description: "Build static website for online hosting (ready for GitHub Pages, Netlify, Vercel, etc.)", inputSchema: { type: "object", properties: { docsPath: { type: "string", description: "Path to documentation directory", }, framework: { type: "string", description: "Documentation framework used", enum: ["docusaurus", "mkdocs", "sphinx"], }, outputPath: { type: "string", description: "Output path for built site (default: ./build)", }, }, required: ["docsPath", "framework"], }, },
  • src/index.ts:308-309 (registration)
    Handler dispatch in the CallToolRequest switch statement that invokes buildStatic for docs_build_static.
    case "docs_build_static": return await buildStatic(args);
  • TypeScript interface defining the input arguments for the buildStatic handler.
    interface BuildStaticArgs { docsPath: string; framework: string; outputPath?: string; }
  • src/index.ts:14-14 (registration)
    Import statement for the buildStatic handler function.
    import { buildStatic } from "./tools/buildStatic.js";

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/LiL-Loco/documentation-mcp-server'

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