Skip to main content
Glama

agentic_file_workflow

Execute multi-step file system workflows by gathering context server-side and using LLM sampling to analyze and act on files without additional tools.

Instructions

Execute agentic file workflows using FastMCP 2.14.5+ sampling (no tools).

Gathers file system context server-side, then uses ctx.sample() to have the LLM analyze and reason about it. Compatible with Claude Desktop which supports basic sampling but not sampling.tools capability.

Args: See Parameters block.

Return Format

{"success": bool, "operation": str, "summary": str, "result": {"workflow_prompt", "steps_executed", "results", "notes", "execution_summary"}, "quality_metrics": {...}, "recommendations": [...], "next_steps": [...]} On failure: {"success": false, "error": str, "error_type": str, "recovery_options": [...], "diagnostic_info": {...}}

Recovery: If NO_CONTEXT, run from an MCP client that injects Context. If SAMPLING_ERROR, shorten the prompt or check server logs; verify the host supports ctx.sample().

Examples

agentic_file_workflow(workflow_prompt="Find and summarize all TODO comments in src/", available_tools=["search_ops"]) agentic_file_workflow(workflow_prompt="Rename all .bak files in D:/data to .old", available_tools=["file_ops", "dir_ops"])

Input Schema

NameRequiredDescriptionDefault
max_iterationsNo
available_toolsYes
workflow_promptYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.0

TDQS

B3.2/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the sampling dependency, the NO_CONTEXT requirement for an MCP client that injects Context, the SAMPLING_ERROR failure mode, and a full return/error envelope. The remaining gap is the unexplained interaction between the "no tools" claim and the required available_tools parameter, which leaves the execution model ambiguous.

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-loaded with the core mechanism in sentence one, then organized under clear headers (Return Format, Recovery, Examples). "Args: See Parameters block." is pure filler, and the duplicated Return Format block is partly redundant with the existing output schema, but overall it is well-structured rather than bloated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so restating the return shape is optional, and the failure/recovery paths are well covered for a tool with a sampling dependency. What's missing is any description of max_iterations semantics or the delegation behavior behind available_tools, which an agent needs to invoke this correctly.

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

Parameters2/5

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

Schema coverage is 0% and the description explicitly defers with "Args: See Parameters block," adding nothing for workflow_prompt or max_iterations (max_iterations is never mentioned at all). Only the examples give indirect shape to workflow_prompt and available_tools, which is insufficient for three undocumented parameters on a non-trivial tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explains the mechanism (server-side context gathering plus ctx.sample()) and gives illustrative examples, but the actual capability is fuzzy: it says "no tools" yet takes an available_tools list and one example renames files, so it's unclear whether this analyzes files or performs file operations. It also never distinguishes itself from siblings like file_ops, dir_ops, or search_ops, which the examples reference.

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

Usage Guidelines3/5

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

The compatibility note ("Compatible with Claude Desktop which supports basic sampling but not sampling.tools capability") and the two examples imply a usage context, and the Recovery section gives error-conditional guidance. However, there is no explicit rule for when to pick this tool over calling file_ops/search_ops directly, which is the key decision an agent faces given the siblings.

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