Skip to main content
Glama

create_file

Create a new markdown file and add it to the searchable knowledge base. Supports global, project, or schema destinations with automatic indexing.

Instructions

Create a new markdown 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 'ctxnest' (internal CtxNest schema file). If destination is 'project' or 'ctxnest', 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 'ctxnest', 'project_id' must be a valid integer. 'tags' and 'folder' are optional.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the file
contentYesContent of the file
destinationYesDestination type
project_idNoProject ID (required for project/ctxnest destinations)
folderNoOptional folder path
tagsNoOptional array of tags
Behavior4/5

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

Without annotations, the description carries the full burden. It explains that the operation writes to disk, adds to FTS5 index, and auto-creates directories. It also states no external auth and no rate limits. While it doesn't describe rollback or concurrency, it provides sufficient detail about side effects.

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 paragraph but well-organized, starting with the primary purpose and then detailing parameters and behavior. It is slightly lengthy but each sentence adds useful information. Could be streamlined, but overall effective.

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 6 parameters, no output schema, and no annotations, the description covers all necessary aspects: operation type, side effects, parameter constraints, return value, and alternative tools. It is fully sufficient for an AI agent to correctly select and invoke the tool.

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?

The input schema has 100% description coverage, so the baseline is 3. The description adds extra meaning by explaining the 'destination' enum values ('knowledge', 'project', 'ctxnest') and the conditional requirement for 'project_id' when destination is 'project' or 'ctxnest'. It also clarifies that 'tags' and 'folder' are optional, adding value beyond the schema.

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 a markdown file in the knowledge base or project, specifying the verb 'Create' and the resource 'markdown file'. It distinguishes from the sibling tool 'update_file' by explicitly mentioning that for modifications, use 'update_file' instead.

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

Usage Guidelines4/5

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

The description provides explicit usage guidance: 'Use this tool to instantiate new contextual documents or notes. To modify an existing file, use 'update_file' instead.' It also explains when to use the 'project_id' parameter for certain destinations. While not covering all negative cases, it gives clear context for when to choose this 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/ctxnest'

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