Skip to main content
Glama
jfrog

JFrog MCP Server

Official
by jfrog

jfrog_update_permission_target

Modify permission targets in the JFrog Platform to adjust user and group access rights for resources like artifacts, release bundles, and builds. Define specific actions and patterns.

Instructions

Update an existing permission target in the JFrog platform

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the permission target to update
targetYes

Implementation Reference

  • Handler function for the 'jfrog_update_permission_target' tool. Destructures args into name and target, reconstructs the full permission target object, and calls the underlying updatePermissionTarget API function.
    handler: async (args: any) => { const { name, target } = args; return await updatePermissionTarget(name, { name, ...target }); }
  • Core helper function that performs the actual HTTP PUT request to the JFrog API to update a permission target.
    export async function updatePermissionTarget(name: string, permissionTarget: z.infer<typeof PermissionTargetSchema>) { const response = await jfrogRequest(`/access/api/v2/permissions/${name}`, { method: "PUT", body: permissionTarget }); return PermissionTargetSchema.parse(response); }
  • Zod schema definition for PermissionTarget, used in the tool's input schema (target field omits name).
    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() });
  • Input schema for the 'jfrog_update_permission_target' tool, specifying name and partial target.
    inputSchema: zodToJsonSchema(z.object({ name: z.string().describe("The name of the permission target to update"), target: PermissionTargetSchema.omit({ name: true }) })),
  • Local registration of the tool as 'updatePermissionTargetTool' in the PermissionsTools array, which is later imported and spread into the global tools list.
    export const PermissionsTools = [ listPermissionTargetsTool, getPermissionTargetTool, createPermissionTargetTool, updatePermissionTargetTool, deletePermissionTargetTool, getPermissionResourceTool, updatePermissionResourceTool, replacePermissionResourceTool, deletePermissionResourceTool ];
  • tools/index.ts:13-23 (registration)
    Global registration of all tools, including spread of PermissionsTools which contains 'jfrog_update_permission_target'.
    export const tools =[ ...RepositoryTools, ...BuildsTools, ...RuntimeTools, ...AccessTools, ...AQLTools, ...CatalogTools, ...CurationTools, ...PermissionsTools, ...ArtifactSecurityTools, ];

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