Skip to main content
Glama
ghiloufibg

Maven Project Generator MCP

by ghiloufibg

add_any_file

Add custom files to Maven projects by specifying file paths and content, enabling flexible project structure customization within the Maven Project Generator MCP server.

Instructions

Ajouter n'importe quel fichier au projet avec chemin personnalise

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesChemin complet du fichier dans le projet (ex: src/main/java/com/example/Utils.java ou docs/README.md)
contentYesContenu du fichier

Implementation Reference

  • The function 'addAnyFile' handles the request by taking 'filePath' and 'content' from the arguments and adding the file to the 'currentProject.files' object.
    async function addAnyFile(args: any) {
      const { filePath, content } = args;
    
      currentProject.files[filePath] = content;
    
      return {
        content: [
          {
            type: "text",
            text: `Fichier ajoute!\n\n` +
                  `Fichier: ${filePath}\n\n` +
                  `Tous les repertoires necessaires seront crees automatiquement dans le ZIP.`,
          },
        ],
      };
    }
  • src/index.ts:139-155 (registration)
    Definition of the 'add_any_file' tool schema and metadata.
      name: "add_any_file",
      description: "Ajouter n'importe quel fichier au projet avec chemin personnalise",
      inputSchema: {
        type: "object",
        properties: {
          filePath: {
            type: "string",
            description: "Chemin complet du fichier dans le projet (ex: src/main/java/com/example/Utils.java ou docs/README.md)",
          },
          content: {
            type: "string",
            description: "Contenu du fichier",
          },
        },
        required: ["filePath", "content"],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool adds files but doesn't describe what happens on conflicts (overwrites? errors?), permission requirements, side effects, or response format. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 that front-loads the core purpose. There's no wasted verbiage, though it could be slightly more structured by explicitly separating purpose from constraints. It earns its place but isn't perfectly optimized.

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 tool's complexity (file addition with mutation), lack of annotations, and no output schema, the description is insufficient. It doesn't cover error conditions, success indicators, or behavioral nuances like path validation. For a tool that modifies project state, more context is needed to use it effectively.

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 both parameters clearly documented in the input schema. The description adds no additional parameter semantics beyond implying 'chemin personnalise' (custom path) aligns with filePath. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 ('Ajouter' - Add) and resource ('n'importe quel fichier au projet' - any file to the project) with the specific capability of custom path specification. It distinguishes from siblings like add_java_file and add_resource_file by emphasizing 'any file' rather than specific types. However, it doesn't explicitly contrast with clear_project or create_maven_project.

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 like add_java_file or add_resource_file. It doesn't mention prerequisites (e.g., needing an existing project), exclusions, or comparative advantages. The agent must infer usage from the tool name and sibling names alone.

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/ghiloufibg/maven-mcp-server'

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