Skip to main content
Glama
Dedcode14

DedcodeMCP File Manager

by Dedcode14

crear_archivo

Create new files with specified names and content through the DedcodeMCP File Manager server to manage desktop files.

Instructions

Crea un archivo nuevo en el sistema

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nombreYesNombre del archivo con extensión
contenidoYesEl contenido del archivo

Implementation Reference

  • main.ts:170-197 (handler)
    Handler for crear_archivo tool: parses args using schema, validates path restricted to desktop, creates directory if needed, writes file content, returns success or error message.
    case "crear_archivo": {
        const { nombre, contenido } = CrearArchivoSchema.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,
            };
        }
    
        await fs.mkdir(path.dirname(ruta), { recursive: true });
        await fs.writeFile(ruta, contenido, "utf-8");
    
        return {
            content: [
                {
                    type: "text",
                    text: `Archivo creado exitosamente: ${nombre}`,
                },
            ],
        };
    }
  • main.ts:43-46 (schema)
    Zod schema for input validation of crear_archivo tool: requires nombre (filename with extension) and contenido (file content).
    const CrearArchivoSchema = z.object({
        nombre: z.string().describe("Nombre del archivo con extensión"),
        contenido: z.string().describe("El contenido del archivo"),
    });
  • main.ts:70-87 (registration)
    Registration of crear_archivo tool in the listTools response, including name, description, and input schema matching the Zod schema.
    {
        name: "crear_archivo",
        description: "Crea un archivo nuevo en el sistema",
        inputSchema: {
            type: "object",
            properties: {
                nombre: {
                    type: "string",
                    description: "Nombre del archivo con extensión",
                },
                contenido: {
                    type: "string",
                    description: "El contenido del archivo",
                },
            },
            required: ["nombre", "contenido"],
        },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'crea' implies a write operation, it fails to mention critical aspects like whether this requires specific permissions, if it overwrites existing files, error handling, or any rate limits. This leaves significant gaps in understanding the tool's behavior.

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

Conciseness5/5

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

The description is a single, efficient sentence: 'Crea un archivo nuevo en el sistema.' It is front-loaded with the core action and resource, with no unnecessary words or redundancy, making it highly concise and well-structured.

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 a file creation tool with no annotations and no output schema, the description is insufficient. It lacks details on behavioral traits, error cases, or return values, which are crucial for safe and effective use. This makes it incomplete for a mutation tool in this context.

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%, with clear descriptions for both parameters ('nombre' as file name with extension, 'contenido' as file content). The description does not add any extra meaning beyond the schema, such as format details or constraints, so it meets the baseline for high schema coverage without compensating further.

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 'Crea un archivo nuevo en el sistema' clearly states the verb 'crea' (creates) and the resource 'archivo nuevo' (new file), making the purpose evident. It distinguishes from siblings like 'editar_archivo' (edit file) or 'eliminar_archivo' (delete file) by focusing on creation, though it doesn't explicitly mention these distinctions in the description itself.

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 lacks any mention of prerequisites, such as needing write permissions or specific contexts, and does not reference sibling tools like 'editar_archivo' or 'leer_archivo' for comparison, leaving usage 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