Skip to main content
Glama
jfrog

JFrog MCP Server

Official
by jfrog

jfrog_list_permission_targets

Retrieve a list of all permission targets in the JFrog platform, enabling pagination and result limits for efficient access management.

Instructions

Get a list of all permission targets in the JFrog platform

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoCursor for pagination
limitNoLimit the number of results

Implementation Reference

  • Local registration of the jfrog_list_permission_targets tool (as listPermissionTargetsTool) in the PermissionsTools array, which is exported for further registration.
    export const PermissionsTools = [
      listPermissionTargetsTool,
      getPermissionTargetTool,
      createPermissionTargetTool,
      updatePermissionTargetTool,
      deletePermissionTargetTool,
      getPermissionResourceTool,
      updatePermissionResourceTool,
      replacePermissionResourceTool,
      deletePermissionResourceTool
  • tools/index.ts:13-23 (registration)
    Global registration where PermissionsTools is spread into the main tools array, making jfrog_list_permission_targets available.
    export const tools =[
      ...RepositoryTools,
      ...BuildsTools,
      ...RuntimeTools,
      ...AccessTools,
      ...AQLTools,
      ...CatalogTools,
      ...CurationTools,
      ...PermissionsTools,
      ...ArtifactSecurityTools,
    ];
  • Full tool definition including the handler function that executes the tool logic by calling getAllPermissionTargets.
    const listPermissionTargetsTool = {
      name: "jfrog_list_permission_targets",
      description: "Get a list of all permission targets in the JFrog platform",
      inputSchema: zodToJsonSchema(z.object({
        cursor: z.string().optional().describe("Cursor for pagination"),
        limit: z.number().optional().describe("Limit the number of results")
      })),
      //outputSchema: zodToJsonSchema(PermissionListSchema),
      handler: async (args: any) => {
        return await getAllPermissionTargets(args.cursor, args.limit);
      }
    };
  • Core helper function called by the tool handler to fetch permission targets via JFrog API and parse response.
    export async function getAllPermissionTargets(cursor?: string, limit?: number) {
      const params = new URLSearchParams();
      if (cursor) params.append("cursor", cursor);
      if (limit) params.append("limit", limit.toString());
      
      const response = await jfrogRequest(`/access/api/v2/permissions${params.toString() ? `?${params.toString()}` : ""}`, {
        method: "GET",
      });
      return PermissionListSchema.parse(response);
    }
  • Zod schema for parsing the output of list permission targets API response.
    const PermissionListSchema = z.object({
      permissions: z.array(z.object({
        name: z.string(),
        uri: z.string()
      })),
      cursor: z.string().optional()
    });
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 read operation ('Get a list'), which implies non-destructive behavior, but fails to mention critical details like authentication requirements, rate limits, error conditions, or the format of returned data. This leaves significant gaps for an agent to understand how to handle the tool effectively.

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, direct sentence that efficiently conveys the core purpose without any fluff or redundancy. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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?

Given the tool's low complexity (list operation with 2 optional parameters) and high schema coverage, the description is minimally adequate. However, with no annotations and no output schema, it lacks details on behavioral traits (e.g., pagination behavior, error handling) and return values, which are important for a list tool. This results in a middling score.

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 input schema has 100% description coverage, with clear documentation for 'cursor' (pagination) and 'limit' (result count). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without compensating value.

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 ('Get a list') and resource ('all permission targets in the JFrog platform'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'jfrog_get_permission_target' (which likely retrieves a single target), leaving room for minor ambiguity in sibling distinction.

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 sibling tools like 'jfrog_get_permission_target' for single-target retrieval or 'jfrog_list_repositories' for other list operations, nor does it specify any prerequisites or contextual triggers for usage.

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