get_project_users
Retrieve all users with access to a specific MantisBT project, optionally filtered by minimum access level.
Instructions
List all users with access to a specific MantisBT project.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Numeric project ID | |
| access_level | No | Minimum access level filter (e.g. 55 = developer, 90 = manager) |
Implementation Reference
- src/tools/projects.ts:51-79 (handler)The 'get_project_users' tool is registered and implemented within 'src/tools/projects.ts'. It uses a 'MantisClient' to fetch users for a specific project ID, with an optional 'access_level' filter.
server.registerTool( 'get_project_users', { title: 'Get Project Users', description: 'List all users with access to a specific MantisBT project.', inputSchema: z.object({ project_id: z.coerce.number().int().positive().describe('Numeric project ID'), access_level: z.coerce.number().int().optional().describe('Minimum access level filter (e.g. 55 = developer, 90 = manager)'), }), annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, }, }, async ({ project_id, access_level }) => { try { const params: Record<string, string | number | boolean | undefined> = {}; if (access_level !== undefined) params.access_level = access_level; const result = await client.get<{ users: MantisUser[] }>(`projects/${project_id}/users`, params); return { content: [{ type: 'text', text: JSON.stringify(result.users ?? result, null, 2) }], }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); return { content: [{ type: 'text', text: errorText(msg) }], isError: true }; } } );