Skip to main content
Glama

create_file

Create new markdown or mermaid files in a knowledge base or project, automatically writing to disk and indexing for search. Supports optional tags and folders.

Instructions

Create a new markdown or mermaid file in the knowledge base or project. This operation writes a new file to disk and adds it to the local SQLite FTS5 index. Destination can be 'knowledge' (global KB), 'project' (reference file inside a project repo), or 'kontexta' (internal Kontexta schema file). If destination is 'project' or 'kontexta', project_id is strictly required. No external auth required. Rate limits do not apply (local operation). Returns the created file metadata including its new ID, path, and estimated tokens. If the destination directory does not exist, it will be created automatically. Use this tool to instantiate new contextual documents or notes. To modify an existing file, use 'update_file' instead. Parameters: 'destination' dictates required fields; if 'project' or 'kontexta', 'project_id' must be a valid integer. 'tags' and 'folder' are optional. Pass format='mmd' to create a Mermaid diagram file (.mmd); defaults to 'md'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the file
contentYesContent of the file
destinationYesDestination type
project_idNoProject ID (required for project/kontexta destinations)
folderNoOptional folder path
tagsNoOptional array of tags
formatNoFile extension to write. Defaults to 'md'.
Behavior5/5

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

No annotations were provided, so the description fully bears the burden of disclosure. It describes side effects (writes to disk, adds to SQLite FTS5 index, automatically creates directories) and confirms constraints (no external auth, no rate limits). It also states the return value includes metadata. This is comprehensive behavioral transparency.

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?

The description is thorough but slightly verbose. It front-loads the core action and then provides details, but some sentences (e.g., 'If the destination directory does not exist, it will be created automatically.') could be more concise. Still, it is well-structured and every sentence adds value, earning a high score.

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?

Given the tool has 7 parameters, no output schema, and no annotations, the description covers all essential aspects: purpose, conditional requirements, side effects, return values, and alternatives. There are no gaps in understanding how to use this tool correctly.

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%, yet the description adds significant value: it explains that 'destination' dictates required fields, that 'project_id' is strictly required for some destinations, that 'tags' and 'folder' are optional, and that 'format' defaults to 'md' but accepts 'mmd' for Mermaid files. This goes well beyond the schema definitions.

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 clearly states the tool creates new markdown or mermaid files in the knowledge base or project. It identifies three destination types and explicitly distinguishes the tool from 'update_file' for modification. The verb 'create' and resource 'file' are specific, and the scope (knowledge, project, kontexta) is well-defined.

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 provides explicit guidance: 'Use this tool to instantiate new contextual documents or notes. To modify an existing file, use 'update_file' instead.' It also outlines conditional requirements (project_id required for certain destinations) and default behavior (format defaults to md). This gives clear context for when and when not to use the tool.

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/safiyu/kontexta'

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