Skip to main content
Glama
SmartBear MCP server

SmartBear MCP server

Official
by SmartBear

Contract Testing: Admin Set User Roles

contract-testing_admin_set_user_roles
Idempotent

Replaces all roles assigned to a user by specifying the user ID and the complete set of role UUIDs to assign.

Instructions

Replace all roles assigned to a user (admin).

Toolset: Admin

Parameters:

  • userId (string) required: UUID of the user

  • roles (array) required: Array of role UUIDs to assign

Input Schema

NameRequiredDescriptionDefault
rolesYesArray of role UUIDs to assign
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

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false; the description usefully adds that the operation overwrites the entire role set, which is real context beyond the annotations. It says nothing about required admin permissions, what happens to existing assignments on an empty array, or error behavior for unknown role UUIDs.

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 core sentence is front-loaded and unambiguous. The trailing Parameters block largely duplicates the input schema, adding length without new information, which keeps it from a 5.

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

Completeness4/5

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

For a simple two-parameter admin mutation with annotations and an output schema, the definition covers purpose and overwrite semantics adequately. The remaining gap is edge-case behavior (empty roles array, invalid role UUIDs), which is minor given the structured data already supplied.

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 the description's parameter list restates the schema wording verbatim ("UUID of the user", "Array of role UUIDs to assign") with no added meaning. It does not explain edge cases such as passing an empty array or whether role UUIDs must already exist, so baseline 3 applies.

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?

"Replace all roles assigned to a user" gives a specific verb and resource, and the word "replace" plus "all" separates it from siblings like contract-testing_admin_add_role_to_user and contract-testing_admin_remove_role_from_user without naming them. It stops short of an explicit sibling callout, so it is clear but not fully differentiated in-text.

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 overwrite framing implies the right usage context (full role-set assignment rather than incremental add/remove), but there is no explicit when-to-use/when-not statement and no named alternative. An agent must infer the routing decision from the verb alone.

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