Skip to main content
Glama
muthanii

Frappe MCP Server

frappe_run_method

Call any whitelisted Frappe method remotely for custom operations like getting user info, computing stock, or triggering workflows. Use when standard CRUD tools are not enough.

Instructions

Call a whitelisted server-side Python method on the Frappe site remotely. Use this for operations not covered by the standard CRUD tools — such as getting the logged user, computing stock balances, running reports, triggering workflows, or invoking custom API methods. The target method must be decorated with @frappe.whitelist() on the server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kwargsNoOptional dictionary of keyword arguments to pass to the remote method. The keys and expected values depend entirely on the specific method being called. Example for stock balance: {'item_code': 'ITEM-001', 'warehouse': 'Stores - W'}. Defaults to an empty dict when omitted.
methodYesDotted Python path to the whitelisted method to call. Examples: 'frappe.auth.get_logged_user', 'frappe.utils.get_stock_balance', 'erpnext.stock.utils.get_stock_balance', or any custom whitelisted method from your Frappe app.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the requirement that the method must be @frappe.whitelist() and mentions triggering workflows. However, it does not explicitly warn about potential destructive actions or side effects beyond workflow triggers.

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?

The description is concise, well-structured, and front-loaded: it starts with the core action, then gives usage context, and ends with parameter details. Every sentence serves a purpose with no redundancy.

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

Completeness4/5

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

Given no output schema and no annotations, the description covers purpose, usage, parameters, and a key requirement. It lacks information on return value format (though it varies by method) and error behavior, but is still fairly complete for a generic method caller.

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

Parameters5/5

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

Schema coverage is 100%, and the description adds significant value: it provides multiple method examples, explains the kwargs parameter with examples, and clarifies default behavior. This goes well beyond the schema's field descriptions.

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 explicitly states the tool's purpose: 'Call a whitelisted server-side Python method on the Frappe site remotely.' It lists specific operations like getting the logged user, computing stock balances, etc., which clearly distinguishes it from sibling CRUD tools.

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

Usage Guidelines5/5

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

The description instructs to use this tool for operations not covered by standard CRUD tools, provides concrete examples, and implicitly advises against using it for basic CRUD (handled by siblings like frappe_create_doc). This is explicit and helpful.

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/muthanii/frappe_mcp'

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