Skip to main content
Glama
jfrog

JFrog MCP Server

Official
by jfrog

jfrog_update_permission_resource

Modify permissions for specific resource types like artifacts, release bundles, or builds within a JFrog MCP Server permission target by updating user and group actions and target patterns.

Instructions

Update a specific resource type within a permission target

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the permission target
resourceYes
resourceTypeYesThe type of resource to update

Implementation Reference

  • Core handler function that executes the PATCH request to the JFrog Access API to update the permission resource for the specified target and resource type. This is invoked by the tool's handler.
    export async function updatePermissionResource(
      name: string, 
      resourceType: "artifact" | "release_bundle" | "build",
      resource: z.infer<typeof ArtifactResourceSchema> | z.infer<typeof ReleaseBundleResourceSchema> | z.infer<typeof BuildResourceSchema>
    ) {
      const response = await jfrogRequest(`/access/api/v2/permissions/${name}/${resourceType}`, {
        method: "PATCH",
        body: resource
      });
      switch (resourceType) {
      case "artifact":
        return ArtifactResourceSchema.parse(response);
      case "release_bundle":
        return ReleaseBundleResourceSchema.parse(response);
      case "build":
        return BuildResourceSchema.parse(response);
      }
    }
  • MCP tool definition for 'jfrog_update_permission_resource', including input schema (converted to JSON schema), description, and thin handler that delegates to the core update function.
    const updatePermissionResourceTool = {
      name: "jfrog_update_permission_resource",
      description: "Update a specific resource type within a permission target",
      inputSchema: zodToJsonSchema(z.object({
        name: z.string().describe("The name of the permission target"),
        resourceType: z.enum(["artifact", "release_bundle", "build"]).describe("The type of resource to update"),
        resource: z.union([ArtifactResourceSchema, ReleaseBundleResourceSchema, BuildResourceSchema])
      })),
      //outputSchema: zodToJsonSchema(z.union([ArtifactResourceSchema, ReleaseBundleResourceSchema, BuildResourceSchema])),
      handler: async (args: any) => {
        return await updatePermissionResource(args.name, args.resourceType, args.resource);
      }
    };
  • Zod schema definitions for resource targets, actions, and specific resource types (artifact, release_bundle, build) used in the tool's input schema and response parsing.
    const ResourceTargetSchema = z.object({
      include_patterns: z.array(z.string()),
      exclude_patterns: z.array(z.string())
    });
    
    const ResourceActionsSchema = z.object({
      users: z.record(z.array(z.enum([
        "READ",
        "WRITE",
        "ANNOTATE",
        "DELETE",
        "DISTRIBUTE",
        "MANAGE"
      ]))),
      groups: z.record(z.array(z.enum([
        "READ",
        "WRITE",
        "ANNOTATE",
        "DELETE",
        "DISTRIBUTE",
        "MANAGE"
      ]))).default({}).describe("The actions that the group can perform on the resource")
    });
    
    const ArtifactResourceSchema = z.object({
      actions: ResourceActionsSchema,
      targets: z.record(ResourceTargetSchema)
    });
    
    const ReleaseBundleResourceSchema = z.object({
      actions: ResourceActionsSchema,
      targets: z.record(ResourceTargetSchema)
    });
    
    const BuildResourceSchema = z.object({
      actions: ResourceActionsSchema,
      targets: z.record(ResourceTargetSchema)
    });
    
    const PermissionTargetSchema = z.object({
      name: z.string(),
      resources: z.object({
        artifact: ArtifactResourceSchema.optional(),
        release_bundle: ReleaseBundleResourceSchema.optional(),
        build: BuildResourceSchema.optional()
      }),
      created_by: z.string().optional(),
      modified_by: z.string().optional()
    });
  • Local array registering all permissions-related tools, including jfrog_update_permission_resource.
    export const PermissionsTools = [
      listPermissionTargetsTool,
      getPermissionTargetTool,
      createPermissionTargetTool,
      updatePermissionTargetTool,
      deletePermissionTargetTool,
      getPermissionResourceTool,
      updatePermissionResourceTool,
      replacePermissionResourceTool,
      deletePermissionResourceTool
    ]; 
  • tools/index.ts:10-23 (registration)
    Global registration: imports PermissionsTools and spreads it into the main tools array for the MCP server.
    import { PermissionsTools } from "./permissions.js";
    import { ArtifactSecurityTools } from "./security.js";
    
    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, the description carries full burden but lacks behavioral details. It mentions 'update' but doesn't clarify if this is a partial or full update, permission requirements, side effects, or error handling. This is inadequate for a mutation tool with security implications.

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

Conciseness4/5

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

The description is a single, clear sentence with no wasted words, making it efficient. However, it's slightly under-specified given the tool's complexity, as it could benefit from more detail without losing conciseness.

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 mutation tool with no annotations, no output schema, and incomplete parameter coverage, the description is insufficient. It lacks details on behavior, usage context, and expected outcomes, leaving critical gaps for an agent to operate safely and effectively.

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 67%, with parameters 'name' and 'resourceType' described but 'resource' lacking a description. The tool description adds no parameter semantics beyond the schema, so it doesn't compensate for the coverage gap but doesn't worsen it either, meeting the baseline.

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

Purpose3/5

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

The description states the action ('update') and target ('specific resource type within a permission target'), which is clear but vague. It doesn't specify what 'update' entails or differentiate from siblings like 'jfrog_update_permission_target' or 'jfrog_replace_permission_resource', leaving ambiguity about scope.

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. Siblings include 'jfrog_update_permission_target' (likely broader updates) and 'jfrog_replace_permission_resource' (possibly full replacement), but the description offers no comparison or context for selection.

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