jfrog_get_permission_target
Retrieve detailed information about a specific permission target in the JFrog Platform to manage access control effectively.
Instructions
Get detailed information about a specific permission target
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the permission target to retrieve |
Implementation Reference
- tools/permissions.ts:181-191 (registration)Tool registration object defining the 'jfrog_get_permission_target' tool, including name, description, input schema, and handler function that delegates to getPermissionTarget.const getPermissionTargetTool = { name: "jfrog_get_permission_target", description: "Get detailed information about a specific permission target", inputSchema: zodToJsonSchema(z.object({ name: z.string().describe("The name of the permission target to retrieve") })), //outputSchema: zodToJsonSchema(PermissionTargetSchema), handler: async (args: any) => { return await getPermissionTarget(args.name); } };
- tools/permissions.ts:188-190 (handler)The tool's handler function which executes the logic by calling getPermissionTarget with the provided name argument.handler: async (args: any) => { return await getPermissionTarget(args.name); }
- tools/permissions.ts:76-81 (helper)Core helper function that makes the HTTP GET request to the JFrog API to fetch the permission target details and parses the response using PermissionTargetSchema.export async function getPermissionTarget(name: string) { const response = await jfrogRequest(`/access/api/v2/permissions/${name}`, { method: "GET", }); return PermissionTargetSchema.parse(response); }
- tools/permissions.ts:45-54 (schema)Zod schema for validating the structure of a PermissionTarget object, used to parse the API response in getPermissionTarget.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() });
- tools/permissions.ts:184-186 (schema)Input schema for the tool, defining the required 'name' parameter converted to JSON schema for MCP.inputSchema: zodToJsonSchema(z.object({ name: z.string().describe("The name of the permission target to retrieve") })),
- tools/permissions.ts:288-298 (registration)Local array registering multiple permission-related tools, including getPermissionTargetTool, exported for inclusion in main tools list.export const PermissionsTools = [ listPermissionTargetsTool, getPermissionTargetTool, createPermissionTargetTool, updatePermissionTargetTool, deletePermissionTargetTool, getPermissionResourceTool, updatePermissionResourceTool, replacePermissionResourceTool, deletePermissionResourceTool ];
- tools/index.ts:13-23 (registration)Main tools export array that spreads PermissionsTools, thereby registering jfrog_get_permission_target among all available tools.export const tools =[ ...RepositoryTools, ...BuildsTools, ...RuntimeTools, ...AccessTools, ...AQLTools, ...CatalogTools, ...CurationTools, ...PermissionsTools, ...ArtifactSecurityTools, ];