Skip to main content
Glama
bizino

BOS MCP Server

by bizino

bos_inventory_check

Check real-time stock quantity for a product by providing its product ID to verify inventory levels.

Instructions

Check stock quantity for a product

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idYes

Implementation Reference

  • The handler function for 'bos_inventory_check' that executes the tool logic: calls client.get('/mcp/inventory/check/${args.product_id}') to check stock quantity for a product.
    {
      name: 'bos_inventory_check',
      description: 'Check stock quantity for a product',
      schema: { product_id: { type: 'string' } },
      handler: async (args, client) => client.get(`/mcp/inventory/check/${args.product_id}`),
    },
  • The inventoryTools array definition containing bos_inventory_check along with other inventory tools (list, update, low_stock).
    export const inventoryTools: McpTool[] = [
      {
        name: 'bos_inventory_list',
        description: 'List inventory stock across all products',
        schema: {
          page: { type: 'number', optional: true },
          page_size: { type: 'number', optional: true },
          warehouse_id: { type: 'string', optional: true },
        },
        handler: async (args, client) => client.get('/mcp/inventory', args),
      },
      {
        name: 'bos_inventory_check',
        description: 'Check stock quantity for a product',
        schema: { product_id: { type: 'string' } },
        handler: async (args, client) => client.get(`/mcp/inventory/check/${args.product_id}`),
      },
      {
        name: 'bos_inventory_update',
        description: 'Update inventory stock',
        schema: {
          product_id: { type: 'string' },
          quantity: { type: 'number' },
          type: { type: 'string', enum: ['set', 'add', 'subtract'] },
          reason: { type: 'string', optional: true },
        },
        handler: async (args, client) => client.post('/mcp/inventory/update', args),
      },
      {
        name: 'bos_inventory_low_stock',
        description: 'Get products with low stock alerts',
        schema: { threshold: { type: 'number', optional: true } },
        handler: async (args, client) => client.get('/mcp/inventory/low-stock', args),
      },
    ];
  • The tool definition object for 'bos_inventory_check', including its name, description, schema (product_id: string), and handler.
    name: 'bos_inventory_check',
  • src/index.ts:55-76 (registration)
    Registration of all tools via server.tool() loop, including bos_inventory_check. The tool is gathered from inventoryTools array (line 37) and registered with its name, Zod schema, and handler wrapper.
    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,
            };
          }
        }
      );
    }
  • src/index.ts:37-37 (registration)
    The inventoryTools array is spread into allTools on line 37, which is how bos_inventory_check gets included in the tool registration loop.
    ...inventoryTools,
Behavior2/5

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

No annotations are available, so the description must fully disclose behavioral traits. It only says 'Check' which implies read-only, but does not confirm idempotency, side effects, or authentication needs. Very minimal disclosure.

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?

The description is a single sentence, efficient and to the point. It could benefit from slightly more detail without becoming verbose, but it is well-structured for its simplicity.

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

Completeness2/5

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

Despite low complexity (1 parameter), the description lacks completeness. There is no output schema and no clarification on what 'stock quantity' entails (e.g., available, reserved, total). It leaves ambiguity about the exact result.

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

Parameters1/5

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

The input schema has 0% coverage for description of 'product_id'. The tool description provides no additional meaning, format, or example for this parameter. It only repeats the parameter's existence indirectly via 'a product'.

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?

The description clearly states the tool's action ('Check stock quantity') and target resource ('a product'). It distinguishes itself from sibling tools like bos_inventory_list and bos_inventory_low_stock by focusing on a single product's stock level.

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 is provided on when to use this tool versus alternatives (e.g., bos_inventory_list for all products, bos_inventory_low_stock for below-threshold items). There are no contexts, prerequisites, or exclusions mentioned.

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