Skip to main content
Glama
delano
by delano

update_collection_roles

Assign VIEWER or EDITOR roles to users, groups, or teams for a Postman collection. Requires EDITOR role on the collection.

Instructions

Update collection roles (requires EDITOR role)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionIdYesThe collection ID
operationsYes

Implementation Reference

  • The handler function that executes the 'update_collection_roles' tool logic. Validates inputs (collectionId and operations), then sends a PATCH request to /collections/{collectionId}/roles with the operations payload.
    async updateCollectionRoles(args: {
      collectionId: string;
      operations: Array<{
        op: 'update';
        path: '/user' | '/group' | '/team';
        value: Array<{
          id: number;
          role: 'VIEWER' | 'EDITOR';
        }>;
      }>;
    }): Promise<ToolCallResponse> {
      if (!args.collectionId) {
        throw new McpError(ErrorCode.InvalidParams, 'collectionId is required');
      }
      if (!args.operations || !Array.isArray(args.operations)) {
        throw new McpError(ErrorCode.InvalidParams, 'operations array is required');
      }
    
      const response = await this.client.patch(
        `/collections/${args.collectionId}/roles`,
        { roles: args.operations }
      );
      return this.createResponse(response.data);
    }
  • Registration of the tool in the handleToolCall switch statement, routing 'update_collection_roles' to the updateCollectionRoles handler method.
    case 'update_collection_roles':
      return await this.updateCollectionRoles(args);
  • The schema definition for the 'update_collection_roles' tool, specifying its name, description, and input validation schema (required fields, types, enums).
    {
      name: 'update_collection_roles',
      description: 'Update collection roles (requires EDITOR role)',
      inputSchema: {
        type: 'object',
        required: ['collectionId', 'operations'],
        properties: {
          collectionId: {
            type: 'string',
            description: 'The collection ID'
          },
          operations: {
            type: 'array',
            items: {
              type: 'object',
              required: ['op', 'path', 'value'],
              properties: {
                op: {
                  type: 'string',
                  enum: ['update'],
                  description: 'Operation type'
                },
                path: {
                  type: 'string',
                  enum: ['/user', '/group', '/team'],
                  description: 'Resource path'
                },
                value: {
                  type: 'array',
                  items: {
                    type: 'object',
                    required: ['id', 'role'],
                    properties: {
                      id: {
                        type: 'number',
                        description: 'User/group/team ID'
                      },
                      role: {
                        type: 'string',
                        enum: ['VIEWER', 'EDITOR'],
                        description: 'Role to assign'
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
  • The AuthTools class returns TOOL_DEFINITIONS (including update_collection_roles) via getToolDefinitions(), used by the MCP tool registry.
    getToolDefinitions(): ToolDefinition[] {
      return TOOL_DEFINITIONS;
    }
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It states a mutation (update) and a prerequisite, but fails to explain whether roles are replaced or merged, if changes are reversible, or what the response is. Important behavioral context is missing.

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?

The description is a single short sentence that gets straight to the point. No unnecessary words or filler.

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?

The tool mutates state but lacks critical context: no output schema, no description of return value, error conditions, or behavioral details like role replacement semantics. Given the complexity of the operations parameter, the description is incomplete.

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 50%, and the schema already provides detailed descriptions for both parameters (collectionId, operations) including enums for operation types, paths, and roles. The description does not add additional meaning beyond the schema, so baseline of 3 is appropriate.

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?

The description clearly states the action (Update) and resource (collection roles), and includes a prerequisite (EDITOR role). This distinguishes it from sibling tools like get_collection_roles and patch_collection.

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

Usage Guidelines3/5

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

The description mentions the required role but does not provide guidance on when to use this tool vs alternatives such as patch_collection or get_collection_roles. No explicit when/when-not logic.

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/delano/postman-mcp-server'

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