Skip to main content
Glama
jfrog

JFrog MCP Server

Official
by jfrog

jfrog_create_virtual_repository

Aggregate multiple repositories into a unified virtual repository in Artifactory, supporting various package types and customizable patterns for artifact inclusion and exclusion.

Instructions

Create a new virtual repository in Artifactory that aggregates multiple repositories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
artifactoryRequestsCanRetrieveRemoteArtifactsNo
debianDefaultArchitecturesNoDefault architectures for Debian repositories
debianTrivialLayoutNoWhether to use trivial layout for Debian repositories
defaultDeploymentRepoNoDefault deployment repository
descriptionNoThe virtual repository public description
environmentsNoEnvironments to assign the repository to
excludesPatternNoPattern to define artifacts to exclude
externalDependenciesEnabledNoEnable external dependencies (Bower, npm, Go)
externalDependenciesPatternsNoPatterns for external dependencies
externalDependenciesRemoteRepoNoRemote repository for external dependencies
forceMavenAuthenticationNoForce authentication for Maven repositories
includesPatternNoPattern to define artifacts to include**/*
keyYesthe key of the repository
keyPairNoKey pair used for signing
notesNoSome internal notes
optionalIndexCompressionFormatsNo
packageTypeYesPackage type of the repository
pomRepositoryReferencesCleanupPolicyNodiscard_active_reference
primaryKeyPairRefNoPrimary GPG key pair reference
projectKeyNoProject key to assign the repository to
rclassYesThe repository type
repoLayoutRefNoRepository layout reference
repositoriesYesList of repository keys to include in the virtual repository
secondaryKeyPairRefNoSecondary GPG key pair reference

Implementation Reference

  • Tool registration for 'jfrog_create_virtual_repository', including the handler function that validates input with CreateVirtualRepoSchema and calls the createVirtualRepository helper.
    const createVirtualRepositoryTool = {
      name: "jfrog_create_virtual_repository",
      description: "Create a new virtual repository in Artifactory that aggregates multiple repositories",
      inputSchema: zodToJsonSchema(CreateVirtualRepoSchema),
      //outputSchema: zodToJsonSchema(JFrogRepositoryCreateResponseSchema),
      handler: async (args: any) => {
        const parsedArgs = CreateVirtualRepoSchema.parse(args);
        return await createVirtualRepository(parsedArgs);
      }
    };
  • Input schema (Zod) for the jfrog_create_virtual_repository tool, defining parameters like repositories list, patterns, and virtual repo options.
    export const CreateVirtualRepoSchema = BaseRepositorySchema.extend({
      rclass: z.literal("virtual").describe("The repository type"),
      repositories: z.array(z.string()).describe("List of repository keys to include in the virtual repository"),
      description: z.string().optional().describe("The virtual repository public description"),
      notes: z.string().optional().describe("Some internal notes"),
      includesPattern: z.string().default("**/*").describe("Pattern to define artifacts to include"),
      excludesPattern: z.string().default("").describe("Pattern to define artifacts to exclude"),
      repoLayoutRef: z.string().optional().describe("Repository layout reference"),
      debianTrivialLayout: z.boolean().default(false).describe("Whether to use trivial layout for Debian repositories"),
      debianDefaultArchitectures: z.string().optional().describe("Default architectures for Debian repositories"),
      artifactoryRequestsCanRetrieveRemoteArtifacts: z.boolean().default(false),
      keyPair: z.string().optional().describe("Key pair used for signing"),
      pomRepositoryReferencesCleanupPolicy: z.enum([
        "discard_active_reference",
        "discard_any_reference",
        "nothing"
      ]).default("discard_active_reference"),
      defaultDeploymentRepo: z.string().optional().describe("Default deployment repository"),
      optionalIndexCompressionFormats: z.array(z.enum(["bz2", "lzma", "xz"])).optional(),
      forceMavenAuthentication: z.boolean().default(false).describe("Force authentication for Maven repositories"),
      externalDependenciesEnabled: z.boolean().default(false).describe("Enable external dependencies (Bower, npm, Go)"),
      externalDependenciesPatterns: z.array(z.string()).optional().describe("Patterns for external dependencies"),
      externalDependenciesRemoteRepo: z.string().optional().describe("Remote repository for external dependencies"),
      primaryKeyPairRef: z.string().optional().describe("Primary GPG key pair reference"),
      secondaryKeyPairRef: z.string().optional().describe("Secondary GPG key pair reference")
    });
  • Core helper function implementing the JFrog API call to create a virtual repository via PUT request to /artifactory/api/repositories/{key}.
    export async function createVirtualRepository(options: z.infer<typeof CreateVirtualRepoSchema>) {
      const response = await jfrogRequest(`/artifactory/api/repositories/${options.key}`, {
        method: "PUT",
        body: options
      });
         
      return JFrogRepositoryCreateResponseSchema.parse(response);
    }
  • Export of RepositoryTools array registering the jfrog_create_virtual_repository tool (at line 172). This array is imported and spread into the main tools list.
    export const RepositoryTools =[ 
      checkJfrogAvailabilityTool,
      createLocalRepositoryTool,
      createRemoteRepositoryTool,
      createVirtualRepositoryTool,
      setFolderPropertyTool,
      listRepositoriesTool
    ];
  • tools/index.ts:13-23 (registration)
    Main tools registration array in index.ts that includes all tools by spreading RepositoryTools (containing jfrog_create_virtual_repository).
    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?

No annotations are provided, so the description carries full burden. It states 'Create' implying a write/mutation operation but doesn't disclose behavioral traits like required permissions, whether it's idempotent, rate limits, or what happens on failure. The description is minimal and lacks crucial operational context.

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?

Single sentence with zero waste, front-loaded with the core action. Every word earns its place by specifying creation, resource type, and aggregation function efficiently.

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

Completeness2/5

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

For a complex mutation tool with 24 parameters, no annotations, and no output schema, the description is inadequate. It lacks information on success/failure behavior, return values, error conditions, and practical usage context, leaving significant gaps for an AI agent.

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?

Schema description coverage is high at 88%, providing good documentation for most parameters. The description adds no parameter-specific information beyond the schema, so it doesn't compensate but doesn't need to heavily. Baseline 3 is appropriate as the schema handles most semantics.

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 ('virtual repository in Artifactory') with the specific function of 'aggregates multiple repositories'. It distinguishes from siblings like 'jfrog_create_local_repository' and 'jfrog_create_remote_repository' by specifying the virtual type, but doesn't explicitly contrast them.

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?

No guidance on when to use this tool versus alternatives like local or remote repositories. The description mentions aggregation but doesn't explain scenarios where a virtual repository is preferred, prerequisites, or exclusions.

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