Skip to main content
Glama
openITCOCKPIT

openITCOCKPIT MCP Server

Official

Allowed Elements for Container

get_allowed_elements_for_container
Read-onlyIdempotent

List valid host templates, contacts, groups, and timeperiods visible in a container before creating an object to avoid rejected values.

Instructions

List the host templates, contacts, contact groups, timeperiods, host groups, etc. that are actually visible from a given container - i.e. the values a Create* tool for that object_type would accept there. openITCOCKPIT restricts every such reference to the target container's own scope (the container plus its descendants, plus a few legacy tenant-wide exceptions); values outside that scope are rejected. Call this BEFORE a create call whenever you are unsure a name is visible in the target container, instead of guessing and retrying on error. object_type must be one of: host, hosttemplate, servicetemplate, hostgroup, contactgroup, servicetemplategroup, contact. For hostgroup/contactgroup/servicetemplategroup/contact, container_name is the intended parent container (the object being created doesn't have its own container yet) - the result always includes 'legal_parent_containers' (the container types allowed to hold that object type), plus a members list (contacts/servicetemplates/timeperiods) only if container_name already resolves to a legal parent. container_name defaults to the root container if not given.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_typeYesObject type whose allowed elements should be listed. Required.
container_nameNoTarget container path. Empty means the root container.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, open-world behavior. The description goes further by revealing scoping rules (container plus descendants plus legacy exceptions), the rejection of out-of-scope values, and the conditional presence of 'legal_parent_containers' and 'members'. These are real behavioral details not inferable from annotations or schema.

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 description is long but front-loads the core purpose and packs genuinely necessary operational detail. Some repetition of object types and edge-case explanation could be tightened, but no sentence is filler.

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

Completeness5/5

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

Combined with the rich annotations, full parameter coverage, and the presence of an output schema, this description fully equips an agent to decide when to call the tool and what to expect. It even preempts the common failure mode of calling create with an invisible name.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema description coverage is 100%, the description adds substantial meaning: container_name defaults to root, and for group object types it represents the intended parent container rather than the object's own container. It also explains the conditional output shape based on whether container_name resolves to a legal parent. This is far beyond the schema's brief 'Target container path'.

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 uses a specific verb ('List') and names a clear resource: allowed elements visible from a given container for a given object_type. It also enumerates the concrete element types and makes the tool's distinct role obvious even among many read-only sibling tools.

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

Usage Guidelines5/5

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

The description explicitly says to call this tool BEFORE a create call whenever unsure whether a name is visible, and tells the agent not to guess and retry on error. It also clarifies which object_type values are valid and how container_name behaves for different object types, giving concrete routing guidance.

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