add_resource_file
Adds a resource file to Maven projects for storing configuration, properties, or data files in main or test directories.
Instructions
Ajouter un fichier de ressources au projet
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fileName": "<fileName>",
"content": "<content>"
},
"name": "add_resource_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileName | Yes | Nom du fichier de ressource | |
| content | Yes | Contenu du fichier | |
| type | No | Type de ressource | main |
Implementation Reference
- src/index.ts:351-368 (handler)The handler function that adds a resource file to the project structure.
async function addResourceFile(args: any) { const { fileName, content, type = "main" } = args; const filePath = `src/${type}/resources/${fileName}`; currentProject.files[filePath] = content; return { content: [ { type: "text", text: `Fichier de ressource ajoute!\n\n` + `Fichier: ${filePath}\n` + `Type: ${type}\n\n` + `Repertoires crees automatiquement si necessaire.`, }, ], }; } - src/index.ts:117-132 (schema)The input schema definition for the add_resource_file tool.
inputSchema: { type: "object", properties: { fileName: { type: "string", description: "Nom du fichier de ressource", }, content: { type: "string", description: "Contenu du fichier", }, type: { type: "string", description: "Type de ressource", enum: ["main", "test"], default: "main", - src/index.ts:115-116 (registration)The registration of the add_resource_file tool.
name: "add_resource_file", description: "Ajouter un fichier de ressources au projet",