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
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Chemin complet du fichier dans le projet (ex: src/main/java/com/example/Utils.java ou docs/README.md) | |
| content | Yes | Contenu du fichier |
Implementation Reference
- src/index.ts:370-385 (handler)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"], }, },