Skip to main content
Glama
bizino

BOS MCP Server

by bizino

bos_cart_get

Retrieves the current user's shopping cart from the BOS ERP system. Use this to view cart contents for order processing.

Instructions

Get current user cart

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for bos_cart_get - makes a GET request to /mcp/cart endpoint
    handler: async (_, client) => client.get('/mcp/cart'),
  • The schema for bos_cart_get - empty object (no parameters required)
    schema: {},
  • Registration of bos_cart_get as part of cartTools array in bos.ts
    {
      name: 'bos_cart_get',
      description: 'Get current user cart',
      schema: {},
      handler: async (_, client) => client.get('/mcp/cart'),
    },
  • Helper function toZodSchema that converts tool schemas to Zod schemas for MCP SDK registration
    export function toZodSchema(schema: Record<string, any>): z.ZodObject<any> {
      const shape: Record<string, z.ZodTypeAny> = {};
    
      for (const [key, def] of Object.entries(schema)) {
        let field: z.ZodTypeAny;
    
        switch (def.type) {
          case 'number':
            field = z.number();
            break;
          case 'boolean':
            field = z.boolean();
            break;
          case 'array':
            field = z.array(z.any());
            break;
          case 'object':
            field = z.record(z.any());
            break;
          case 'string':
          default:
            if (def.enum) {
              field = z.enum(def.enum);
            } else {
              field = z.string();
            }
            break;
        }
    
        if (def.description) {
          field = field.describe(def.description);
        }
    
        if (def.optional) {
          field = field.optional();
        }
    
        shape[key] = field;
      }
    
      return z.object(shape);
    }
  • src/http.ts:55-75 (registration)
    Registration loop in HTTP server that registers all tools (including bos_cart_get) with the MCP server
    for (const tool of allTools) {
      const zodSchema = toZodSchema(tool.schema);
      server.tool(
        tool.name,
        tool.description,
        zodSchema.shape,
        async (args: any) => {
          try {
            const result = await tool.handler(args, client);
            return {
              content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
            };
          } catch (error: any) {
            return {
              content: [{ type: 'text' as const, text: JSON.stringify({ error: error.message || 'Unknown error' }) }],
              isError: true,
            };
          }
        }
      );
    }
Behavior2/5

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

No annotations provided; the description does not disclose whether the operation is read-only, requires authentication, or returns specific data. With no annotations, the description carries the burden but adds minimal transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is a single sentence of four words, no waste. It is appropriately concise for a simple getter, though could include more context without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, no output schema, no annotations), the description is minimally adequate. However, it lacks behavioral context that would help an agent decide when to invoke it, especially among many cart-related siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has no properties (0 parameters), and schema description coverage is 100%. Since there are no parameters, description cannot add parameter info, but baseline 4 applies as no additional semantics are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description 'Get current user cart' uses a specific verb 'Get' and a clear resource 'current user cart', distinguishing it from sibling tools like bos_cart_add_item or bos_cart_clear.

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 such as bos_cart_add_item or bos_cart_clear. There is no mention of typical use cases or prerequisites.

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

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/bizino/bos-mcp'

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