Skip to main content
Glama

rr_send_purchase_order

Send approved purchase orders to suppliers to manage inventory replenishment and prevent stockouts.

Instructions

Send an approved PO to the supplier

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
po_idYes

Implementation Reference

  • The 'callApi' function serves as the central handler for executing MCP tools. It forwards the tool name and arguments to a remote API endpoint.
    async function callApi(toolName: string, input: Record<string, unknown>): Promise<unknown> {
      const resp = await fetch(`${BASE_URL}/api/mcp/call`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${API_KEY}`,
        },
        body: JSON.stringify({ tool: toolName, input }),
      });
    
      if (!resp.ok) {
        const errorBody = await resp.text();
        throw new Error(`API error ${resp.status}: ${errorBody}`);
      }
  • src/index.ts:51-51 (registration)
    The tool 'rr_send_purchase_order' is registered in the TOOLS constant definition within src/index.ts.
    { name: 'rr_send_purchase_order', description: 'Send an approved PO to the supplier', 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