Skip to content

Tool Reference

Frappe Assistant Core ships 24 built-in tools across 4 plugins. All tools are exposed over MCP at /api/method/frappe_assistant_core.api.fac_endpoint.handle_mcp.

PluginToolsDescription
core17Always enabled. Document CRUD, search, metadata, reports, workflow.
data_science4Python execution, SQL queries, statistical analysis, file content extraction.
visualization3Dashboards and charts.
custom_toolsMechanism for external Frappe apps to register their own tools via the assistant_tools hook. No shipped tools.

To toggle plugins, see Plugin Management. To control which tools each role can call, see Tool Management.

Core plugin (17 tools)

Always enabled. Provides essential Frappe operations.

Document operations (6)

ToolPurpose
create_documentCreate a new Frappe document
get_documentFetch a single document by name
update_documentUpdate document fields (supports patch and replace modes for child tables)
submit_documentSubmit a submittable document
delete_documentDelete a document (force=true to ignore links)
list_documentsPaginated list with filters, fields, and ordering

Search (5)

ToolPurpose
search_documentsGlobal text search across common DocTypes
search_doctypeText search within one DocType
search_linkLink-field autocomplete search (Frappe's standard link search)
chatgpt_searchOpenAI MCP-compatible search adapter — wraps search_documents and returns {id, title, url} items
chatgpt_fetchOpenAI MCP-compatible fetch adapter — returns full document content as {id, title, text, url, metadata}

Metadata (1)

ToolPurpose
get_doctype_infoField definitions, link fields, permissions, and naming info for a DocType

Reports (3)

ToolPurpose
report_listList available reports, optionally filtered by report_type (Script Report, Query Report, Report Builder)
report_requirementsDescribe a report's required filters, columns, and metadata before running it
generate_reportExecute a Script or Query Report. Report Builder reports are not supported.

Workflow (2)

ToolPurpose
run_workflowTrigger a workflow action (Approve, Reject, etc.) on a document
get_pending_approvalsList documents awaiting the current user's workflow action

Data Science plugin (4 tools)

Optional. Requires pandas and numpy.

ToolPermissionsPurpose
run_python_codeSystem ManagerExecute Python in an isolated subprocess sandbox. Pre-loaded: pd, np, frappe, math, datetime, json, re, random. Plotting libraries are not available.
run_database_querySystem ManagerExecute read-only SELECT queries. INSERT/UPDATE/DELETE/DDL and multi-statement queries are rejected.
analyze_business_dataDocType readStatistical / trend / correlation / aggregation analysis on a DocType. Modes: summary, trends, correlations, aggregations, comparisons.
extract_file_contentFile readOCR and text extraction from File DocType attachments. Supports PDF, images, DOCX, XLSX, TXT. Backend is PaddleOCR (default) or Ollama vision (configurable).

See Python Code Orchestration and Code Execution Security for the sandbox details.

Visualization plugin (3 tools)

Optional. Requires pandas, numpy, and a charting backend.

ToolPurpose
create_dashboardCreate a Frappe Dashboard with optional chart membership, filters, sharing, and refresh interval
create_dashboard_chartCreate a Dashboard Chart and optionally attach it to an existing dashboard via dashboard_name
list_user_dashboardsList dashboards visible to the current user (dashboard_type: all, frappe, insights)

Custom Tools plugin

The custom_tools plugin discovers tools registered by other installed Frappe apps via the assistant_tools hook. It ships with no tools of its own — see your installed apps' documentation for what they expose.

Per-tool documentation

Per-tool inputSchema, return shape, and behaviour notes live in the source repo alongside each tool implementation:

The authoritative inputSchema for any tool is in its Python file's __init__.

Released under the AGPL-3.0 License.