Skip to main content
Glama
jasonlcs

Waferlock Robot MCP

by jasonlcs

get_manual_info

Retrieve detailed information about specific robot manuals using their file ID to access technical documentation and operational guides.

Instructions

Get information about a specific manual by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileIdYesThe ID of the manual file

Implementation Reference

  • The core handler function that implements the get_manual_info tool. It fetches the manual by ID using the manualProvider, returns a not-found message if absent, otherwise serializes the manual for structured content and formats it for text response.
    async (args) => {
      const manual = await this.manualProvider.getManualById(args.manualId);
      if (!manual) {
        return {
          content: [
            {
              type: 'text',
              text: `Manual ${args.manualId} not found.`,
            },
          ],
        };
      }
      const serialised = serialiseManual(manual);
      return {
        content: [
          {
            type: 'text',
            text: formatManual(manual),
          },
        ],
        structuredContent: serialised,
      };
    }
  • The input schema and description for the get_manual_info tool, using Zod for validating the required manualId string parameter.
    {
      description: 'Get basic information about a specific manual (metadata only, no content/download)',
      inputSchema: { manualId: z.string() },
    },
  • The registration of the get_manual_info tool on the MCP server, including name, schema, and inline handler function.
    this.server.registerTool(
      'get_manual_info',
      {
        description: 'Get basic information about a specific manual (metadata only, no content/download)',
        inputSchema: { manualId: z.string() },
      },
      async (args) => {
        const manual = await this.manualProvider.getManualById(args.manualId);
        if (!manual) {
          return {
            content: [
              {
                type: 'text',
                text: `Manual ${args.manualId} not found.`,
              },
            ],
          };
        }
        const serialised = serialiseManual(manual);
        return {
          content: [
            {
              type: 'text',
              text: formatManual(manual),
            },
          ],
          structuredContent: serialised,
        };
      }
    );
  • Helper function to serialize a manual object for structured output, handling date serialization and optional fields.
    function serialiseManual(manual: UploadedFile) {
      return {
        ...manual,
        uploadedAt: manual.uploadedAt instanceof Date ? manual.uploadedAt.toISOString() : manual.uploadedAt,
        indexStartedAt: manual.indexStartedAt || null,
        indexCompletedAt: manual.indexCompletedAt || null,
      };
    }
  • Helper function to format a single manual as a pretty-printed JSON string for text content.
    function formatManual(manual: UploadedFile): string {
      return JSON.stringify(serialiseManual(manual), null, 2);
    }
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/jasonlcs/waferlock-robot-mcp-public'

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