Skip to main content
Glama

files_create

Create markdown, mermaid, or HTML knowledge-base files in batches up to 200 per call, each written to disk and indexed for full-text search.

Instructions

Create one or more markdown, mermaid, or HTML files in the knowledge base or project (up to 200 per call). Pass a single-element files array for the one-file case. This operation writes each file to disk and adds it to the local SQLite FTS5 index. Destination is 'knowledge' (global KB) or 'kontexta' (internal Kontexta schema file, project_id required). 'project' is REFUSED: nothing created through kxta is written into a project repo. If destination is 'knowledge', 'kind' is strictly required for md files, pick 'dictionary' (authoritative source-of-truth) or 'note' (informational snapshot); see the kind param for the rubric. No external auth required. Rate limits do not apply (local operation). Per-item failures are isolated to errors[], the rest of the batch still commits; a single-item call still reports its failure the same way. Returns {created_count, error_count, created, errors}. If a destination directory does not exist, it will be created automatically. To modify an existing file, use 'files_update' instead. Pass format='mmd' on an item to create a Mermaid diagram file (.mmd), for destination='knowledge' it's auto-routed to the KB's mermaid/ bucket (kind ignored, not required); Pass format='html' for an HTML report, destination MUST be 'knowledge' (html reports are auto-routed to the KB's html/ bucket; kind is ignored and not required for html). Format defaults to 'md'.

Input Schema

NameRequiredDescriptionDefault
filesYesFiles to create. Single-element array = one-file case. Max 200 per call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv6.1.2

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so richly — writes to disk AND the SQLite FTS5 index, 'project' is REFUSED, no external auth, no rate limits, auto-creation of missing directories, and per-item failure isolation (errors[] with the rest of the batch still committing). This is exactly the behavioral context an agent needs before calling a write tool.

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?

Front-loads the core action and batching rule, and every sentence is substantive. It is long and info-dense with somewhat sprawling ordering (returns shape and directory auto-creation sit mid-paragraph), so it is not maximally tight, but nothing is padding.

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 mutation tool with no annotations and no output schema, the description covers creation side effects, destination constraints, format routing, failure semantics, and even the return shape ({created_count, error_count, created, errors}). An agent has everything needed to invoke it correctly across the batch and single-file cases.

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 already 100%, yet the description adds routing semantics beyond it: format='mmd' auto-routes to the mermaid/ bucket (kind ignored), format='html' requires destination='knowledge' and routes to html/ (kind ignored), and format defaults to 'md'. The destination='knowledge' vs 'kontexta' (project_id required) distinction is clarified further than the schema alone.

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?

States a specific verb ('Create'), the resource (markdown, mermaid, or HTML files), the container (knowledge base or project), and the batching scope (up to 200 per call). It also names the sibling used for modification ('files_update'), so an agent can distinguish it from other files_* tools without opening a schema.

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?

Explicitly routes the agent: use 'files_update' to modify existing files, single-element array for the one-file case, and per-destination rules ('kind' strictly required for md to knowledge, project REFUSED). When/when-not conditions are stated rather than implied.

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