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"],
      },
    },

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