Skip to main content
Glama

ERPNext: Get stock balance

erpnext_get_stock_balance
Read-only

ERPNext: Quantity and stock value of one item in one warehouse on a date. Returns the quantity and stock value for one item in one warehouse, the same two figures as Quick Stock Balance in ERPNext (Stock > Tools). Without a date it returns today. It reads one item and one warehouse per call; to check a whole order, call it once per line. Needs the user's Cotlet API key with access to this app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoYYYY-MM-DD. Default: today.
item_codeYesItem code from list_items.
warehouseYesWarehouse name from your site.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/destructiveHint/openWorldHint, so safety is covered. The description adds genuine value beyond that: the no-date default (today), the auth requirement (Cotlet API key with app access), and the per-call read granularity. It stops short of describing rate limits or exact return shape.

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?

Front-loaded with the core purpose, then defaults, granularity, and auth in logical order. Efficient overall, though the opening sentence and the 'Returns the quantity and stock value...' sentence partially restate the same figures.

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

Completeness5/5

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

There is no output schema, so the description carries return-value disclosure and does so ('quantity and stock value'). Combined with the date default, per-call granularity, and auth note, an agent has everything needed to call it correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so item_code, warehouse, and date are already documented. The description restates the date default ('returns today') and frames item_code/warehouse as single-per-call, which is mild added value but largely repeats structured data. Baseline 3 is appropriate.

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?

States a specific verb and resource ('Quantity and stock value of one item in one warehouse on a date') and anchors it to the ERPNext Quick Stock Balance screen. It nails the scope (one item, one warehouse) which is refined further in the body. An agent can distinguish it from read/write siblings like list_items or create_sales_invoice.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the usage pattern for orders ('to check a whole order, call it once per line') and the date default, giving clear invocation context. It does not name a specific alternative tool, but the single-item granularity guidance is strong enough for a 4.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources