Skip to main content
Glama
ERPNext MCP Server

ERPNext MCP Server

by hatlabs

get_documents

Retrieve a filtered list of ERPNext records for a specified DocType, with optional fields and limits; defaults to 20 results when no limit is set.

Instructions

Get a list of documents for a specific doctype. ERPNext defaults to 20 results if no limit is specified.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "doctype": "<doctype>"
    },
    "name": "get_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of documents to return (optional)
fieldsNoFields to include (optional)
doctypeYesERPNext DocType (e.g., Customer, Item)
filtersNoFilters in the format {field: value} (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses the ERPNext default of 20 results when no limit is set, which is real behavioral context an agent needs. However, it reveals nothing about read-only nature, permission requirements, pagination beyond limit, or the shape of returned records.

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

Conciseness5/5

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

Two short sentences, front-loaded with the purpose and followed by the one non-obvious behavioral fact. Nothing is repeated from the schema and there is no filler.

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?

For a four-parameter list tool with a nested filters object, no annotations, and no output schema, the definition is minimally adequate. It omits how filters operators work, how fields interacts with the default field set, and what a returned document contains—gaps the agent must discover by trial.

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 the schema already defines doctype, limit, fields, and filters, making 3 the baseline. The description adds one genuinely new fact not in the schema: the server-side default of 20 results for limit, which affects how results should be interpreted.

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

Purpose4/5

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

States a specific verb and resource ('Get a list of documents') scoped to a 'specific doctype', which implicitly separates it from the singular get_document and from get_doctypes. It stops short of naming any sibling explicitly, so differentiation is inferential rather than stated.

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?

There is no when-to-use or when-not-to-use guidance, and no alternative is named despite close siblings like get_document, get_child_documents, and run_report. The only contextual note is about result count, not tool selection.

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