Skip to main content
Glama
ghiloufibg

Maven Project Generator MCP

by ghiloufibg

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNameYesNom du fichier de ressource
contentYesContenu du fichier
typeNoType de ressourcemain

Implementation Reference

  • 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.`,
          },
        ],
      };
    }
  • 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",

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