Skip to main content
Glama

list_all_users

Read-onlyIdempotent

Retrieve all accepted organization users with their IDs, names, emails, roles, and timestamps to get user IDs needed for user management actions.

Instructions

List accepted org users with id, name, email, role, and timestamps. Use this to find a user_id before get_user, update_user, delete_user, or add_workspace_member; use list_user_invites for pending invitations. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false

Implementation Reference

  • The main handler for the 'list_all_users' tool. Calls service.users.listUsers(), formats results using the formatUser helper, and returns a JSON response with total count and user list.
    server.tool(
    	"list_all_users",
    	"List accepted org users with id, name, email, role, and timestamps. Use this to find a user_id before get_user, update_user, delete_user, or add_workspace_member; use list_user_invites for pending invitations.",
    	USERS_TOOL_SCHEMAS.listAllUsers,
    	async () => {
    		const users = await service.users.listUsers();
    		return {
    			content: [
    				{
    					type: "text",
    					text: JSON.stringify(
    						{
    							total: users.total,
    							users: users.data.map(formatUser),
    						},
    						null,
    						2,
    					),
    				},
    			],
    		};
    	},
    );
  • Schema definition for list_all_users - an empty object (no input parameters required).
    listAllUsers: {},
  • Registration of the 'list_all_users' tool on the MCP server via server.tool(), within the registerUsersTools function (called from src/tools/index.ts via TOOL_DOMAIN_REGISTRARS entry for 'users').
    server.tool(
    	"list_all_users",
    	"List accepted org users with id, name, email, role, and timestamps. Use this to find a user_id before get_user, update_user, delete_user, or add_workspace_member; use list_user_invites for pending invitations.",
    	USERS_TOOL_SCHEMAS.listAllUsers,
    	async () => {
    		const users = await service.users.listUsers();
    		return {
    			content: [
    				{
    					type: "text",
    					text: JSON.stringify(
    						{
    							total: users.total,
    							users: users.data.map(formatUser),
    						},
    						null,
    						2,
    					),
    				},
    			],
    		};
    	},
    );
  • formatUser helper function that transforms a PortkeyUser into the output format (id, name, email, role, created_at, last_updated_at).
    function formatUser(user: PortkeyUser): {
    	id: string;
    	name: string;
    	email: string;
    	role: string;
    	created_at: string;
    	last_updated_at: string;
    } {
  • The listUsers() method in UsersService class that makes a GET request to /admin/users endpoint to fetch all users from the Portkey API.
    async listUsers(): Promise<PortkeyUsersResponse> {
    	return this.get<PortkeyUsersResponse>("/admin/users");
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnly, non-destructive, idempotent, open-world hints. Description adds enterprise-gating info and 403 error case, which is useful beyond annotations.

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?

Two sentences, front-loaded with purpose, then usage guidance, then restriction. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters, presence of output schema, and annotations, this description fully covers what the tool does, when to use it, and a key limitation (enterprise-gated).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters in schema, so no additional info needed. Description mentions the fields returned, which is helpful context for the output.

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

Purpose5/5

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

Clearly states the tool lists accepted org users with specific fields (id, name, email, role, timestamps). Distinguishes from similar siblings like get_user and list_user_invites.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells when to use this tool (to find a user_id before other user-related operations) and when to use an alternative (list_user_invites for pending invitations).

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

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/s-b-e-n-s-o-n/portkey-admin-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server