Skip to main content
Glama

create_doctype

Preview or create standard and site-custom DocTypes in Frappe, defining fields, permissions, and DocType-level properties for app-file or site-metadata storage.

Instructions

Preview or create a standard or site-custom DocType through Frappe.

fields accepts the native DocField properties and field types. properties carries supported DocType-level settings such as autoname, tracking, sorting, and search configuration. Standard DocTypes require a local app/module checkout and Developer Mode so Frappe can write JSON, Python, JavaScript, and test files. Site-custom DocTypes are stored in site metadata and do not generate app files.

Input Schema

NameRequiredDescriptionDefault
appYes
nameYes
fieldsYes
moduleYes
confirmNo
is_treeNo
is_customNo
is_singleNo
propertiesNo
permissionsNo
is_child_tableNo
is_submittableNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the burden, and it does disclose meaningful traits: standard DocTypes generate JSON, Python, JavaScript, and test files on disk, while custom ones only touch site metadata. It omits what happens if the DocType already exists, whether writes are reversible, and what permissions are required for the write path.

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?

Four short sentences, front-loaded with the operation and followed by the two mode-specific constraints. No filler, though a sentence on `confirm` would have been worth more than the softer wording about 'supported DocType-level settings'.

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?

An output schema exists so return values need no explanation, and the mode distinction is covered. But for a 12-parameter creation tool with no annotations, the silence on `confirm`, `is_custom`, and `permissions` leaves the agent without enough to invoke it confidently.

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

Parameters2/5

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

Schema description coverage is 0% across 12 parameters, and the description only explains `fields` and `properties`. Critical flags like `confirm` (the preview/create gate), `is_custom` (which mode is selected), `is_submittable`, `is_child_table`, and `permissions` are left with bare titles, so the agent must guess.

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 concrete verb+resource ('Preview or create a standard or site-custom DocType') and immediately differentiates two modes. It is distinguishable from the sibling create_document (records, not schema), though the word 'Preview' is never tied to an argument.

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

Usage Guidelines3/5

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

It explains prerequisites for each mode — standard types need an app/module checkout and Developer Mode, site-custom types live in site metadata — which implies when each is viable. But it never says how to choose between them for a given task, nor how to trigger preview versus actual creation, and it offers no exclusion against create_document or create_custom_field.

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