Skip to main content
Glama
jfrog

JFrog MCP Server

Official
by jfrog

jfrog_set_folder_property

Define custom properties for a folder in Artifactory, with optional recursive application to sub-folders. Use this tool to organize and manage folder metadata effectively.

Instructions

Set properties on a folder in Artifactory, with optional recursive application

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderPathYesPath to the folder where properties should be set
propertiesYesKey-value pairs of properties to set
recursiveNoWhether to apply properties recursively to sub-folders

Implementation Reference

  • Core handler function implementing the API logic to set properties on an Artifactory folder using PUT /api/storage/{path} with properties and recursive query parameters.
    export async function setFolderProperty(folderPath: string, properties: Record<string, string>, recursive = false) {
      // Convert properties object to query string format
      const propsQuery = Object.entries(properties)
        .map(([key, value]) => `${key}=${value}`)
        .join(";");
    
      const url = `/artifactory/api/storage/${folderPath}?properties=${propsQuery}&recursive=${recursive ? 1 : 0}`;
    
      const response = await jfrogRequest(url, {
        method: "PUT"
      });
    
      return response;
    }
  • Zod schema for tool input validation: folderPath (string), properties (record<string, string>), recursive (boolean, default false).
    export const SetFolderPropertySchema = z.object({
      folderPath: z.string().describe("Path to the folder where properties should be set"),
      properties: z.record(z.string()).describe("Key-value pairs of properties to set"),
      recursive: z.boolean().default(false).describe("Whether to apply properties recursively to sub-folders")
    });
  • Tool definition object registering 'jfrog_set_folder_property' with name, description, input schema, and handler that validates args and delegates to setFolderProperty.
    const setFolderPropertyTool = {
      name: "jfrog_set_folder_property",
      description: "Set properties on a folder in Artifactory, with optional recursive application",
      inputSchema: zodToJsonSchema(SetFolderPropertySchema),
      //outputSchema: zodToJsonSchema(z.object({})),
      handler: async (args: any) => {
        const parsedArgs = SetFolderPropertySchema.parse(args);
        return await setFolderProperty(parsedArgs.folderPath, parsedArgs.properties, parsedArgs.recursive);
      }
    };
  • Registers the jfrog_set_folder_property tool (as setFolderPropertyTool) within the RepositoryTools array.
    export const RepositoryTools =[ 
      checkJfrogAvailabilityTool,
      createLocalRepositoryTool,
      createRemoteRepositoryTool,
      createVirtualRepositoryTool,
      setFolderPropertyTool,
      listRepositoriesTool
    ];
  • tools/index.ts:13-23 (registration)
    Main tools registry includes RepositoryTools (spreading all repository tools including jfrog_set_folder_property).
    export const tools =[
      ...RepositoryTools,
      ...BuildsTools,
      ...RuntimeTools,
      ...AccessTools,
      ...AQLTools,
      ...CatalogTools,
      ...CurationTools,
      ...PermissionsTools,
      ...ArtifactSecurityTools,
    ];

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/jfrog/mcp-jfrog'

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