Skip to main content
Glama
Dedcode14

DedcodeMCP File Manager

by Dedcode14

leer_archivo

Read the content of an existing file in the DedcodeMCP File Manager to access stored information for processing or analysis.

Instructions

Lee el contenido de un archivo existente

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nombreYesNombre del archivo a leer

Implementation Reference

  • main.ts:199-225 (handler)
    Handler function for leer_archivo tool: parses args with schema, validates path, reads file from desktop using fs.readFile, returns content.
    case "leer_archivo": {
        const { nombre } = LeerArchivoSchema.parse(args);
        const ruta = path.join(DESKTOP_DIR, nombre);
    
        if (!validarRuta(ruta)) {
            return {
                content: [
                    {
                        type: "text",
                        text: "Error: Solo se permite acceso al escritorio",
                    },
                ],
                isError: true,
            };
        }
    
        const contenido = await fs.readFile(ruta, "utf-8");
    
        return {
            content: [
                {
                    type: "text",
                    text: `Contenido de ${nombre}:\n\n${contenido}`,
                },
            ],
        };
    }
  • main.ts:48-50 (schema)
    Zod schema for leer_archivo input validation: requires 'nombre' string.
    const LeerArchivoSchema = z.object({
        nombre: z.string().describe("Nombre del archivo a leer"),
    });
  • main.ts:88-100 (registration)
    Tool registration in ListToolsResponse: defines name, description, and inputSchema for leer_archivo.
    {
        name: "leer_archivo",
        description: "Lee el contenido de un archivo existente",
        inputSchema: {
            type: "object",
            properties: {
                nombre: {
                    type: "string",
                    description: "Nombre del archivo a leer",
                },
            },
            required: ["nombre"],
        },
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as error handling (e.g., if file doesn't exist), permissions required, output format (e.g., text, binary), or any side effects, which is inadequate for a tool with mutation potential.

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 a single, efficient sentence with no wasted words, making it appropriately concise. However, it lacks front-loading of critical details like constraints or alternatives, slightly reducing its effectiveness.

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

Completeness2/5

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

Given the complexity of file operations, no annotations, and no output schema, the description is incomplete. It fails to explain return values, error cases, or how it differs from siblings, leaving significant gaps for an AI agent to use it correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema already documents the parameter 'nombre' fully. The description adds no additional meaning beyond what the schema provides, such as file path conventions or encoding details, resulting in the baseline score.

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

Purpose4/5

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

The description clearly states the action ('Lee el contenido') and resource ('de un archivo existente'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'listar_archivos' or 'editar_archivo' beyond the basic verb, which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like file existence, compare to 'listar_archivos' for metadata vs. content, or specify scenarios like reading text vs. binary files, leaving usage context unclear.

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/Dedcode14/DedcodeMCP'

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