Skip to main content
Glama
FutureAtoms

Agentic Control Framework (ACF)

by FutureAtoms

read_multiple_files

Read content from multiple files by providing their paths in an array.

Instructions

Read multiple files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYes

Implementation Reference

  • The readMultipleFiles function that implements the tool logic. It takes an array of file paths and allowed directories, maps each path to readFile(), and returns a combined response with per-file success/error/content results.
    /**
     * Reads multiple files at once
     * @param {Array<string>} filePaths - List of file paths to read
     * @param {Array<string>} allowedDirs - List of allowed directories
     * @returns {object} - Response object with file contents
     */
    function readMultipleFiles(filePaths, allowedDirs) {
      try {
        if (!filePaths || !Array.isArray(filePaths) || filePaths.length === 0) {
          return { success: false, message: 'No file paths provided' };
        }
    
        const results = filePaths.map(filePath => {
          const result = readFile(filePath, allowedDirs);
          return {
            path: filePath,
            success: result.success,
            content: result.success ? result.content : null,
            mimeType: result.mimeType,
            isText: result.isText,
            error: result.success ? null : result.message
          };
        });
    
        return {
          success: true,
          results
        };
      } catch (error) {
        logger.error(`Error reading multiple files: ${error.message}`);
        return { success: false, message: `Error reading multiple files: ${error.message}` };
      }
    }
  • MCP tool registration/input schema for read_multiple_files: defines the 'paths' array parameter as required, with items of type string.
    { name:'read_multiple_files', description:'Read multiple files', inputSchema:{ type:'object', properties:{ paths:{ type:'array', items:{type:'string'} } }, required:['paths'] } },
  • Handler registration/case branch in the MCP server that dispatches the 'read_multiple_files' tool call to filesystemTools.readMultipleFiles(args.paths, allowedDirectories).
    case 'read_multiple_files':
      data = filesystemTools.readMultipleFiles(args.paths, allowedDirectories);
      break;
  • Module exports for readMultipleFiles (exported alongside other filesystem tools).
    module.exports = {
      readFile,
      readMultipleFiles,
Behavior1/5

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

With no annotations and only a three-word description, there is no disclosure of behavioral traits such as file encoding, error handling, or whether content is returned as raw text or structured data. The description fails to inform agents about side effects or constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely short at three words, but this is under-specification rather than conciseness. It lacks critical details that could be added without losing brevity.

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

Completeness1/5

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

Given the absence of an output schema and annotations, the description carries the full burden of explaining behavior. It fails to mention output format, array handling, or any constraints, making it inadequate for correct tool selection and invocation.

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

Parameters1/5

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

Schema description coverage is 0% (no descriptions in properties), and the tool description adds no value beyond the schema. The 'paths' parameter is not explained, leaving agents guessing about format, allowed types, or interpretation (e.g., absolute vs relative paths).

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 'Read multiple files' states the action (read) and resource (multiple files), which distinguishes it from the single-file sibling 'read_file'. However, it does not specify what 'read' entails (e.g., file contents, metadata) or how results are returned.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives like 'read_file', nor any context on prerequisites or limitations. The description completely lacks usage direction.

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/FutureAtoms/agentic-control-framework'

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