Skip to main content
Glama

Opsphere — DevOps & SRE Intelligence

Close work context

ops_context_close

Connection Hub only. Explicitly close an active context_id opened by the current Hub user and MCP session. A normal workspace switch does not require this call because ops_context_open replaces the prior conversation context atomically.

Input Schema

NameRequiredDescriptionDefault
context_idYes

Output Schema

NameRequiredDescriptionDefault
okYes
dataYes
contractVersionYes
dataSchemaVersionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedOutput schema / properties / data / properties / accounts / items / additionalProperties
      Previous value: -{
      -  "type": [
      -    "string",
      -    "number",
      -    "boolean",
      -    "null"
      -  ]
      -}New value: +false
    • addedOutput schema / properties / data / properties / accounts / items / properties
      Added value: +{
      +  "display_name": {
      +    "type": "string"
      +  },
      +  "id": {
      +    "type": "string"
      +  },
      +  "label": {
      +    "type": "string"
      +  },
      +  "linked_at": {
      +    "type": "string"
      +  },
      +  "status": {
      +    "type": "string"
      +  },
      +  "tenant": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "id": {
      +        "type": "string"
      +      },
      +      "slug": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "slug"
      +    ],
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / data / properties / accounts / items / required
      Added value: +[
      +  "id",
      +  "label",
      +  "tenant",
      +  "status",
      +  "display_name",
      +  "linked_at"
      +]
    • removedOutput schema / properties / data / properties / connections / $ref
      Removed value: -"#/properties/data/properties/accounts"
    • addedOutput schema / properties / data / properties / connections / items
      Added value: +{
      +  "$ref": "#/properties/data/properties/accounts/items"
      +}
    • addedOutput schema / properties / data / properties / connections / type
      Added value: +"array"
    • changedOutput schema / properties / data / properties / error / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "$ref": "#/properties/data/properties/accounts/items"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": {
      +      "type": [
      +        "string",
      +        "number",
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "type": "object"
      +  }
      +]
  2. Changed6 schema fields changed
    • changedOutput schema / properties / data / additionalProperties
      Previous value: -trueNew value: +false
    • changedOutput schema / properties / data / properties / accounts / items / additionalProperties
      Previous value: -trueNew value: +{
      +  "type": [
      +    "string",
      +    "number",
      +    "boolean",
      +    "null"
      +  ]
      +}
    • removedOutput schema / properties / data / properties / accounts / items / properties
      Removed value: -{}
    • addedOutput schema / properties / data / properties / connection
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "display_name": {
      +      "type": "string"
      +    },
      +    "tenant_id": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / dataSchemaVersion
      Added value: +{
      +  "const": 1,
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "contractVersion",
      -  "ok",
      -  "data"
      -]New value: +[
      +  "contractVersion",
      +  "dataSchemaVersion",
      +  "ok",
      +  "data"
      +]
  3. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare non-read-only, non-destructive, non-open-world, so the safety profile is covered. The description adds value with the 'Connection Hub only' scoping and the atomic-replacement guarantee of the alternative path. It does not say what happens on an invalid/already-closed context_id or whether closing is reversible, which matters for a state-changing call.

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, zero filler. Scope restriction is front-loaded ahead of the negative guidance about workspace switches, which is exactly the ordering an agent benefits from.

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?

An output schema exists so return values need not be explained, and annotations cover the destructive/read-only profile. What is missing is error semantics for a stale or foreign context_id — the one thing an agent is likely to hit when calling a close tool.

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 0%, so the description must carry the load. It does: context_id must reference an 'active' context opened by the 'current Hub user and MCP session', which conveys ownership and liveness constraints the bare string schema lacks. Only the format of the ID remains undocumented.

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?

States a specific verb and resource ('explicitly close an active context_id') and names the sibling relationship to ops_context_open. The description does not explain what closing actually accomplishes beyond ending the context, but the action is unambiguous enough to distinguish it from siblings.

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?

Gives an explicit when-not rule: a normal workspace switch does not require this call because ops_context_open replaces the prior context atomically. It names the alternative tool and the condition that selects it, though it leaves implicit the situation in which an agent SHOULD call it (e.g. finishing a session).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources