Skip to main content
Glama
jfrog

JFrog MCP Server

Official
by jfrog

jfrog_create_local_repository

Set up a local repository in JFrog Artifactory with specific configurations, including package type, project key, and assigned environments, for efficient artifact management.

Instructions

Create a new local repository in artifactroy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoRepository description
environmentsNoEnvironments to assign the repository to
keyYesthe key of the repository
packageTypeYesPackage type of the repository
projectKeyNoProject key to assign the repository to
rclassYesThe repository type

Implementation Reference

  • The core handler function that executes the JFrog Artifactory API call to create a local repository via PUT request to `/artifactory/api/repositories/{key}` with the provided options.
    export async function createLocalRepository(options: CreateLocalRepositoryOptions) {
      console.error("Starting createLocalRepository");
      const response = await jfrogRequest(`/artifactory/api/repositories/${options.key}`, {
        method: "PUT",
        body: options
      });
        
      return JFrogRepositoryCreateResponseSchema.parse(response);
    }
  • Zod schemas defining the input structure for creating a local repository: BaseRepositorySchema provides common fields, extended by CreateLocalRepoSchema which fixes rclass to 'local'.
    export const BaseRepositorySchema = z.object({
      key: z.string().describe("the key of the repository"),
      rclass: z.enum([
        "local", "remote", "virtual", "federated"
      ]).describe("The repository type"),
      packageType: PackageTypeEnum,
      projectKey: z.string().optional().describe("Project key to assign the repository to"),
      environments: z.array(z.string()).optional().describe("Environments to assign the repository to"),
      description: z.string().optional().describe("Repository description")
    });
      
    export const CreateLocalRepoSchema = BaseRepositorySchema.extend({
      rclass: z.literal("local").describe("The repository type")
    });
  • Tool registration object defining the 'jfrog_create_local_repository' tool, including name, description, input schema, and handler that parses args and delegates to createLocalRepository.
    const createLocalRepositoryTool = {
      name: "jfrog_create_local_repository",
      description: "Create a new local repository in artifactroy",
      inputSchema: zodToJsonSchema(CreateLocalRepoSchema),
      //outputSchema: zodToJsonSchema(JFrogRepositoryCreateResponseSchema),
      handler: async (args: any) => {
        const parsedArgs = CreateLocalRepoSchema.parse(args);
        return await createLocalRepository(parsedArgs);
      }
    };
  • Export of RepositoryTools array that includes the createLocalRepositoryTool for use in the main tools list.
    export const RepositoryTools =[ 
      checkJfrogAvailabilityTool,
      createLocalRepositoryTool,
      createRemoteRepositoryTool,
      createVirtualRepositoryTool,
      setFolderPropertyTool,
      listRepositoriesTool
    ];
  • tools/index.ts:13-23 (registration)
    Global tools array registration where RepositoryTools (containing jfrog_create_local_repository) is spread into the main exported tools list.
    export const tools =[
      ...RepositoryTools,
      ...BuildsTools,
      ...RuntimeTools,
      ...AccessTools,
      ...AQLTools,
      ...CatalogTools,
      ...CurationTools,
      ...PermissionsTools,
      ...ArtifactSecurityTools,
    ];
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Create' implies a write operation, it doesn't specify required permissions, whether the operation is idempotent, what happens on duplicate keys, or any rate limits. It also doesn't describe the response format or success/failure conditions, leaving significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a tool with good schema documentation and gets straight to the point with zero wasted content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with no annotations and no output schema, the description is minimally adequate. It identifies the resource type but doesn't address important contextual aspects like authentication requirements, error handling, or what the tool returns. The 100% schema coverage helps, but behavioral context is incomplete for a mutation operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so all parameters are documented in the schema itself. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters, provide examples, or clarify edge cases. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Create') and resource ('new local repository in artifactory'), making the purpose immediately understandable. It distinguishes this from sibling tools like 'create_remote_repository' and 'create_virtual_repository' by specifying 'local', though it doesn't explicitly contrast with other repository creation tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, when local repositories are appropriate compared to remote/virtual ones, or any dependencies on other tools like project creation. The agent must infer usage from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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