Skip to main content
Glama
SmartBear MCP server

SmartBear MCP server

Official
by SmartBear

Contract Testing: Admin Add Role to User

contract-testing_admin_add_role_to_user

Assign a single role to a specified user using user and role UUIDs, enabling admins to manage access permissions in Contract Testing.

Instructions

Add a single role to a user (admin).

Toolset: Admin

Parameters:

  • userId (string) required: UUID of the user

  • roleId (string) required: UUID of the role

Input Schema

NameRequiredDescriptionDefault
roleIdYesUUID of the role
userIdYesUUID of the user

Output Schema

NameRequiredDescriptionDefault
successYesThe operation completed; the API returns no body.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.43.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "success": {
      +      "const": true,
      +      "description": "The operation completed; the API returns no body.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. Addedv0.40.0
  3. Removedv0.34.0
  4. First observedv0.27.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, so the agent knows this is a non-idempotent, non-destructive mutation. The description adds only the '(admin)' privilege signal; it does not say what happens if the user already has the role, whether the call is additive or replacing, or what errors signal a missing user/role.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is front-loaded and unambiguous, and the toolset note is one line. The parameter block largely duplicates the input schema rather than earning new information, but total length is small and nothing is padded.

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

Completeness3/5

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

An output schema exists, so return values need no explanation. For a two-parameter admin mutation, though, the definition is silent on prerequisites and on edge behavior (already-assigned role, unknown IDs), leaving real gaps an agent would want covered.

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 100% and both parameters are already documented as 'UUID of the user'/'UUID of the role', which the description restates verbatim. Baseline 3 is appropriate: no additional meaning (e.g., where to obtain these UUIDs, whether roleId accepts names) is contributed.

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

Purpose4/5

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

The description states a specific verb and resource ('Add a single role to a user'), and the word 'single' implicitly contrasts with the sibling set_user_roles, which replaces the full role set. However, it never names that sibling or explicitly frames the additive-vs-replacement distinction, so the differentiation is inferential rather than stated.

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

Usage Guidelines2/5

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

No guidance on when to choose this over contract-testing_admin_set_user_roles, admin_remove_role_from_user, or admin_patch_team_users. The '(admin)' marker hints at a permission context but does not tell an agent under which conditions to prefer this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools