Skip to main content
Glama

rr_get_po_documents

Retrieve documents attached to a purchase order for inventory management and order tracking.

Instructions

List documents attached to a PO

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
po_idYes

Implementation Reference

  • The CallToolRequestSchema handler in main() genericizes tool execution by passing the tool name to the callApi helper function, which then calls the backend API endpoint.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
      try {
        const result = await callApi(name, (args as Record<string, unknown>) || {});
        return {
          content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
        };
      } catch (error) {
        const message = error instanceof Error ? error.message : String(error);
        return {
          content: [{ type: 'text', text: `Error: ${message}` }],
          isError: true,
        };
      }
  • src/index.ts:37-37 (registration)
    Tool 'rr_get_po_documents' is registered in the TOOLS array with its input schema.
    { name: 'rr_get_po_documents', description: 'List documents attached to a PO', inputSchema: { type: 'object' as const, properties: { po_id: { type: 'string' } }, required: ['po_id'] } },

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/ReplenishRadar/MCP'

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