Skip to main content
Glama
jfrog

JFrog MCP Server

Official
by jfrog

jfrog_list_repositories

List and filter Artifactory repositories by type, package type, or project using the JFrog MCP Server's API capabilities for efficient repository management.

Instructions

List all repositories in Artifactory with optional filtering by type, package type, and project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageTypeNoFilter repositories by package type
projectNoFilter repositories by project key
typeNoFilter repositories by type

Implementation Reference

  • Core handler function that constructs the API URL with optional query parameters for filtering repositories by type, packageType, and project, makes a GET request using jfrogRequest, and parses the response with ListRepositoriesResponseSchema.
    export async function listRepositories(params?: z.infer<typeof ListRepositoriesParamsSchema>) {
      let url = "/artifactory/api/repositories";
        
      if (params) {
        const queryParams = new URLSearchParams();
        if (params.type) queryParams.append("type", params.type);
        if (params.packageType) queryParams.append("packageType", params.packageType);
        if (params.project) queryParams.append("project", params.project);
          
        const queryString = queryParams.toString();
        if (queryString) {
          url += `?${queryString}`;
        }
      }
    
      const response = await jfrogRequest(url, {
        method: "GET"
      });
    
      return ListRepositoriesResponseSchema.parse(response);
    }
  • Zod schema defining the input parameters for listing repositories: optional type, packageType, and project filters.
    export const ListRepositoriesParamsSchema = z.object({
      type: RepositoryTypeEnum.optional().describe("Filter repositories by type"),
      packageType: PackageTypeEnum.optional().describe("Filter repositories by package type"),
      project: z.string().optional().describe("Filter repositories by project key")
    });
  • Tool registration object defining the name, description, input schema, and handler that delegates to the listRepositories function.
    const listRepositoriesTool = {
      name: "jfrog_list_repositories",
      description: "List all repositories in Artifactory with optional filtering by type, package type, and project",
      inputSchema: zodToJsonSchema(ListRepositoriesParamsSchema),
      //outputSchema: zodToJsonSchema(ListRepositoriesResponseSchema),
      handler: async (args: any) => {
        const parsedArgs = ListRepositoriesParamsSchema.parse(args);
        return await listRepositories(parsedArgs);
      }
    };
  • Zod schema for the response: array of RepositoryInfoSchema objects.
    export const ListRepositoriesResponseSchema = z.array(RepositoryInfoSchema);
  • Export of the array of repository-related tools, including jfrog_list_repositories, likely used for global tool registration.
    export const RepositoryTools =[ 
      checkJfrogAvailabilityTool,
      createLocalRepositoryTool,
      createRemoteRepositoryTool,
      createVirtualRepositoryTool,
      setFolderPropertyTool,
      listRepositoriesTool
    ];
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a list operation, implying read-only behavior, but doesn't cover important aspects like pagination, rate limits, authentication requirements, or what happens if no repositories match filters. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 front-loads the core purpose ('List all repositories in Artifactory') followed by the key filtering capabilities. Every word serves a purpose with zero waste or redundancy.

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 read-only list tool with 100% schema coverage but no output schema, the description adequately covers the basic purpose and parameters. However, without annotations or output schema, it lacks details on behavioral aspects like response format, pagination, or error handling, which would be helpful for complete understanding.

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 100%, with clear descriptions for each parameter in the schema itself. The description adds value by summarizing the filtering options ('optional filtering by type, package type, and project'), but doesn't provide additional semantic context beyond what's already documented in the schema parameters.

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 action ('List all repositories') and resource ('in Artifactory'), making the purpose immediately understandable. It distinguishes from siblings like jfrog_list_builds or jfrog_list_projects by specifying repositories, though it doesn't explicitly contrast with other repository-related tools like jfrog_create_local_repository.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning 'optional filtering by type, package type, and project', suggesting when to use it for filtered vs. unfiltered listing. However, it doesn't provide explicit guidance on when to choose this tool over alternatives like jfrog_execute_aql_query for more complex queries or when not to use it.

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