Skip to main content
Glama

Set Active Tenant

set-active-tenant

Set or clear the Cumulocity tenant for the current CLI project session so later sessions in the same working directory reuse it; clearing disables live API calls until a tenant is set again.

Instructions

Set the Cumulocity tenant for this CLI session, or pass tenantUrl: null to clear the active tenant. The tenantUrl must match one returned by the status tool. The selection is persisted for the working directory this server was started in, so later sessions in the same project reuse it; sessions in other directories are never affected. Clearing falls back to bundled-only browsing — codemode discovery still works but live API calls are unavailable until a tenant is set again.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tenantUrl": "<tenantUrl>"
    },
    "name": "set-active-tenant"
  }
}

Input Schema

NameRequiredDescriptionDefault
tenantUrlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.7.2
  2. Removedv2.6.2
  3. Addedv2.5.1

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses state persistence scoped to the server's working directory, that other directories are never affected, and the exact degraded behavior after clearing (codemode discovery still works, live API calls unavailable). This is precisely the side-effect and scope information an agent needs before calling a stateful mutation.

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 primary action and the clear-mode are front-loaded in the first sentence, and each subsequent sentence adds a distinct operational fact (validation source, persistence scope, fallback). It runs slightly long for a single-parameter tool but contains no filler.

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 one-parameter stateful tool with no annotations and no output schema, the description covers purpose, validation source, persistence scope, and post-clear behavior. It would be complete with one more clause on what happens when the URL fails validation or what the caller can observe on success.

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?

Schema description coverage is reported as 0%, and the description compensates: it explains that tenantUrl must match a value returned by the status tool and that a null value clears the active tenant. The only gap is the error behavior when a non-matching URL is supplied, which is implied ('must match') rather than stated.

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 opens with a specific verb+resource ('Set the Cumulocity tenant for this CLI session') and explicitly covers both modes, including the null-clearing case. It is clearly distinguishable from the siblings: status is named as the source of valid URLs and codemode is referenced in the fallback behavior.

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

Usage Guidelines4/5

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

It gives a concrete prerequisite for use ('The tenantUrl must match one returned by the status tool') and explains the effect of clearing, which tells the agent when clearing is appropriate. It stops short of an explicit call-order instruction like 'call status first to discover valid URLs', so it does not fully reach the when/when-not/alternatives bar.

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