Skip to main content
Glama

inject_directory_to_mindmap

Scans a directory tree, reads supported text files, and injects their contents as formatted nodes into a specified mindmap, handling all conversion automatically.

Instructions

Scan a directory, read file contents, and inject everything into a mindmap.

This is a one-shot tool: it scans the directory tree, reads each file's content, converts it to Quill Delta JSON (for .md/.markdown/.txt files), builds the full node hierarchy, and syncs it to the mindmap via sync_nodes.

The AI does NOT need to manipulate JSON — everything happens internally.

RECOMMENDED WORKFLOW:

  1. Call tree_scope on the same path to get a reference count.

  2. Call inject_directory_to_mindmap with the same path + id_mindmap.

  3. Compare the returned summary (total_nodes, descriptions_filled) with the tree_scope count. If they match and errors is empty, the injection is validated — do NOT call get_mindmap to re-verify.

File handling by extension:

  • .md / .markdown → content converted via markdown_to_quill_delta()

  • .txt → content wrapped as plain text Quill Delta

  • .docx, .pdf, .xlsx, images, binaries, etc. → node created, description empty

  • Unknown extensions → node created, description empty

  • Files > 500 KB → node created, description empty (too large)

The 'descriptions' field on each node is a Quill Delta JSON string. Directory nodes (categories) never get descriptions — only file leaves do.

Args: root_path: absolute path to the directory to scan root_title: title for the root node (empty = use directory name) id_mindmap: target mindmap ID to inject the nodes into

Returns: JSON string with a summary: {"status": "success", "total_nodes": N, "descriptions_filled": N, "files_ignored": N, "total_desc_size_kb": N, "errors": [], "ignored_formats": [".docx", ".pdf", ...]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
root_pathYes
id_mindmapNo
root_titleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations provided, but the description fully explains behavior: one-shot operation, internal JSON conversion, file handling by extension, size limit (500 KB), and that directory nodes get no descriptions. It is transparent about what happens internally.

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 well-structured with sections (intro, workflow, file handling, args, returns). However, it is somewhat lengthy; some detail could be streamlined without losing value.

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's complexity (directory scanning, multiple file types, output summary), the description is comprehensive. It covers file handling, parameter defaults, workflow, return format with example, and error indication. Output schema exists, so return format is covered.

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 0%, but the description adds full meaning: root_path (absolute path), root_title (defaults to directory name), id_mindmap (default 0). It clarifies each parameter's role 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 scans a directory, reads files, and injects content into a mindmap. It specifies the verb-resource combination and distinguishes from sibling tools like tree_scope and sync_nodes.

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 includes a recommended workflow (call tree_scope first, then inject, compare results) and explicitly advises against calling get_mindmap for verification. It also details file handling rules for when to create nodes with descriptions vs empty.

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/Sebastien-VZN/axomind-mcp'

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