Skip to main content
Glama

myco_intake

Scan a directory and automatically ingest each supported file into the knowledge base. Use filters to select subsets, a cap to limit ingest count, and dry-run to preview without writing.

Instructions

Walk a directory, list every adapter-ingestible file via myco_forage, then call myco_eat on each. The atomic bulk-ingest composer that replaces the v0.5.x unimplemented forage --digest-on-read flag.

Single-responsibility composition: forage stays read-only; eat stays single-note; intake is the only verb that composes both with a write side-effect.

Use this when: a fresh substrate needs to absorb an existing directory tree (a paper archive, a code repository, a meeting-log folder). Use --filter regex to select a subset; --max to cap ingest count; --dry-run to preview.

Failure semantics: per-file ingest failures produce a status: failed stub note in notes/raw/ (NOT silent skip; see L0 P2 + AD1 dim) and are reported in the result payload's failures list. --strict mode raises on any failure (exit_code=2).

Side effects: writes 0+ notes to notes/raw/ (one per ingestible file, with frontmatter status=ok|failed). R6 write_surface gated.

Returns: { exit_code, ingested, failed, failures, notes, dry_run }. Use myco_assimilate afterwards to promote the successful raws to integrated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or substrate-relative directory path to scan recursively. Forwarded to myco_forage to list adapter-handled files; each gets ingested via myco_eat. Use forward slashes or escaped backslashes on Windows.
filterNoOptional regex applied to the candidate path string. Only files whose path matches are ingested. Useful for slicing a large tree (e.g. only PDFs: ``\.pdf$``; only one subdir: ``^docs/research/``).
maxNoHard cap on number of files ingested. Useful for staged ingest of a very large directory: run with --max=100 first, assimilate, then re-run.
dry_runNoWhen true, list intended ingest actions without writing. The payload's ``ingested`` and ``notes`` reflect what WOULD happen.
strictNoWhen true, any per-file ingest failure raises MycoError (exit_code=2) — strict-mode treats partial failure as full failure. Default false: failures produce stub notes and continue.
project_dirNoAbsolute path of the workspace / project whose Myco substrate this call targets. Overrides auto-discovery. When omitted, Myco resolves via MCP roots/list, then MYCO_PROJECT_DIR, then cwd — the substrate_pulse field in every response echoes which source answered.
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: side effects (writes notes to notes/raw/), failure semantics (per-file failures produce stubs, reported in failures list, --strict raises on any failure), and scope (recursive directory scan). It also mentions access control ('R6 write_surface gated') and return payload structure.

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 clear paragraphs for purpose, usage, failure semantics, side effects, and returns. It is front-loaded with the core action. While slightly verbose, every sentence adds 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 and lack of output schema, the description provides comprehensive information: what it does, when to use, parameter effects, failure modes, side effects, and the expected return format. It also references the next step (myco_assimilate), closing the loop.

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. The description adds value beyond the schema by explaining practical usage for each parameter: e.g., --filter for regex selection, --max for staged ingest, --strict for full failure mode, and --project_dir for workspace targeting.

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's action: 'Walk a directory, list every adapter-ingestible file via myco_forage, then call myco_eat on each.' It also distinguishes it from sibling tools by explaining that myco_forage is read-only, myco_eat is single-note, and myco_intake composes both with a write side-effect.

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 explicitly states when to use this tool: 'when a fresh substrate needs to absorb an existing directory tree'. It provides guidance on optional parameters like --filter, --max, and --dry-run. It implies alternatives by mentioning single-responsibility composition, though it doesn't explicitly say 'do not use for single file ingest'.

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/Battam1111/Myco'

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