Skip to main content
Glama

create_file

Create new markdown or mermaid files in the knowledge vault or a project repo. The operation writes the file, indexes it, and returns metadata including ID, path, and token estimate.

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
tagsNoOptional array of tags
titleYesTitle of the file
folderNoOptional folder path
formatNoFile extension to write. Defaults to 'md'.
contentYesContent of the file
project_idNoProject ID (required for project/kontexta destinations)
destinationYesDestination type
Behavior5/5

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

With no annotations, the description fully bears the burden of behavioral disclosure and excels. It reveals that the operation writes to disk, indexes in SQLite FTS5, auto-creates missing directories, returns metadata (ID, path, estimated tokens), and explicitly states no external auth or rate limits apply. This is far beyond typical descriptions.

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 a single dense paragraph that front-loads the core purpose in the first sentence. It includes some repetition of schema details (e.g., tags/folder optional), but every sentence serves a purpose and the structure is logical, moving from action to behavior to usage to parameters.

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?

For a tool with 7 parameters, 3 required, and no output schema, the description is remarkably complete. It covers purpose, usage, behavioral side effects, parameter constraints, return metadata, and an alternative tool. Nothing critical is missing for an agent to select and invoke the tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds meaningful semantics: it interprets the 'destination' enum values (global KB, project repo, internal schema file), clarifies that 'project_id' is strictly required for project/kontexta, and explains the 'format' default and its mapping to '.mmd'. This exceeds the schema's bare 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 opens with a specific verb+resource ('Create a new markdown or mermaid file') and immediately specifies the valid destinations (knowledge, project, kontexta). It also explicitly distinguishes itself from 'update_file', making its scope clear.

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 states when to use the tool ('Use this tool to instantiate new contextual documents or notes') and provides an explicit alternative ('To modify an existing file, use 'update_file' instead'). It also details destination-specific requirements (project_id required for project/kontexta), giving clear contextual guidance.

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