Skip to main content
Glama
ZSvirt

zsvirt-mcp-server

Official
by ZSvirt

ZSvirt MCP Server

English | įŽ€äŊ“中文

An MCP server that enables AI assistants to dynamically discover and invoke more than 2,000 ZSvirt APIs.

Features

  • API search: Search ZStack APIs by keyword with fuzzy matching

  • API description: Retrieve detailed parameter documentation for an API

  • API execution: Invoke a ZStack API and return its result

  • Metric search: Search available monitoring metrics

  • Metric data retrieval: Retrieve monitoring data for a specified metric

Related MCP server: CloudStack MCP Server

Installation

# Install from PyPI
pip install zsvirt-mcp-server

# Or install with uv
uv pip install zsvirt-mcp-server

💡 You can also run the server directly with uvx or pipx run without installing it. See Usage.

Configuration

Set the following environment variables:

export ZSTACK_API_URL="http://localhost:8080"  # ZStack API endpoint
export ZSTACK_ALLOW_ALL_API="false"             # Allow write operations (optional; default: false)

# Authentication method 1: account and password (automatically logs in and obtains a session)
export ZSTACK_ACCOUNT="admin"                   # Account name
export ZSTACK_PASSWORD="your-password"          # Plain-text password

# Authentication method 2: use an existing session ID
# This method takes precedence over account/password authentication.
export ZSTACK_SESSION_ID="your-session-uuid"    # Existing session UUID

# Query response controls (optional)
export ZSTACK_QUERY_DEFAULT_LIMIT="50"          # Default Query API limit; set to 0 to disable
export ZSTACK_RESPONSE_SIZE_LIMIT="65536"       # Maximum response size in bytes; set to 0 to disable

Authentication methods

Method

Environment variables

Description

Account and password

ZSTACK_ACCOUNT + ZSTACK_PASSWORD

Automatically logs in and obtains a session

Session ID

ZSTACK_SESSION_ID

Uses an existing session and takes precedence over account/password authentication

💡 If both ZSTACK_SESSION_ID and account/password credentials are configured, the session ID takes precedence.

Security

By default, only read-only APIs are allowed, including:

  • Query* — query operations

  • Get* — get operations

  • List* — list operations

  • Describe* — describe operations

  • Check* — check operations

  • Count* — count operations

  • Other read-only operations

To enable write APIs such as CreateVmInstance and DeleteVolume, set:

export ZSTACK_ALLOW_ALL_API="true"

âš ī¸ Warning: When write operations are enabled, an AI assistant can create, delete, and modify resources. Enable this option with care.

Query response controls

The server injects limit=50 into Query APIs by default to prevent a single request from filling the model context window. If a response exceeds 64 KiB, the server truncates the inventories list while preserving valid JSON.

Environment variable

Default

Description

ZSTACK_QUERY_DEFAULT_LIMIT

50

Default limit injected when a Query API does not specify one; set to 0 to disable

ZSTACK_RESPONSE_SIZE_LIMIT

65536

Maximum response size in bytes; oversized responses are truncated; set to 0 to disable

  • An explicitly supplied limit is never overwritten.

  • A truncated response includes a _truncation field suggesting pagination with limit/start or response reduction with fields.

Usage

Run as an MCP server

# Run directly with uvx (no installation required)
uvx zsvirt-mcp-server

# Or use pipx
pipx run zsvirt-mcp-server

# Run the installed command
zsvirt-mcp-server

SSE transport

The default transport is stdio. Use command-line options or environment variables to enable SSE:

# Command-line options
uvx zsvirt-mcp-server --transport sse --host 0.0.0.0 --port 8000

# Environment variables
export MCP_TRANSPORT="sse"
export MCP_HOST="0.0.0.0"
export MCP_PORT="8000"
export MCP_PATH="/sse"  # Optional
uvx zsvirt-mcp-server

The server also supports the native FastMCP variables FASTMCP_HOST, FASTMCP_PORT, and FASTMCP_MOUNT_PATH.

Streamable HTTP transport

# Command-line options
uvx zsvirt-mcp-server --transport streamable-http --host 0.0.0.0 --port 8000 --streamable-path /mcp

# Environment variables
export MCP_TRANSPORT="streamable-http"
export MCP_HOST="0.0.0.0"
export MCP_PORT="8000"
export MCP_STREAMABLE_PATH="/mcp"  # Optional
uvx zsvirt-mcp-server

The server also supports FASTMCP_STREAMABLE_HTTP_PATH.

HTTP header authentication (multi-tenant mode)

In SSE or Streamable HTTP mode, an administrator can run a shared MCP server while each user supplies their own credentials through HTTP headers.

HTTP header

Environment variable

Description

X-ZStack-Account

ZSTACK_ACCOUNT

Account name

X-ZStack-Password

ZSTACK_PASSWORD

Password

X-ZStack-Session-Id

ZSTACK_SESSION_ID

Existing session; takes precedence over account/password authentication

X-ZStack-API-URL

ZSTACK_API_URL

ZStack management node endpoint; allows proxying multiple environments

Credential precedence: HTTP headers > environment variables.

# Start a shared MCP server
ZSTACK_ALLOW_ALL_API=false uvx zsvirt-mcp-server --transport streamable-http --host 0.0.0.0 --port 8000

Users can configure credentials as HTTP headers in an MCP client:

{
  "mcpServers": {
    "zstack": {
      "transport": "streamable-http",
      "url": "http://mcp-server:8000/mcp",
      "headers": {
        "X-ZStack-Account": "user-a",
        "X-ZStack-Password": "password-a",
        "X-ZStack-API-URL": "http://zstack-env-1:8080"
      }
    }
  }
}
  • Sessions are cached and reused for the same account.

  • Requests with different X-ZStack-API-URL values are routed to different ZStack environments.

  • stdio mode has no HTTP headers and automatically falls back to environment-variable authentication.

Claude Desktop configuration

Add the server to claude_desktop_config.json.

Method 1: account and password

{
  "mcpServers": {
    "zstack": {
      "command": "uvx",
      "args": ["zsvirt-mcp-server"],
      "env": {
        "ZSTACK_API_URL": "http://your-zstack-server:8080",
        "ZSTACK_ACCOUNT": "admin",
        "ZSTACK_PASSWORD": "your-password",
        "ZSTACK_ALLOW_ALL_API": "false"
      }
    }
  }
}

Method 2: session ID

{
  "mcpServers": {
    "zstack": {
      "command": "uvx",
      "args": ["zsvirt-mcp-server"],
      "env": {
        "ZSTACK_API_URL": "http://your-zstack-server:8080",
        "ZSTACK_SESSION_ID": "your-session-uuid",
        "ZSTACK_ALLOW_ALL_API": "false"
      }
    }
  }
}

💡 Set ZSTACK_ALLOW_ALL_API to "true" to enable create, delete, and modify operations.

Available tools

1. search_api

Search ZStack APIs by keyword.

Parameters:

  • keywords (list[str]): Search keywords, for example ["Query", "Vm"]

  • category (str, optional): Filter by category

  • limit (int, default: 15): Maximum number of results

2. describe_api

Retrieve detailed parameter documentation for an API.

Parameters:

  • api_name (str): API name, for example QueryVmInstance

3. execute_api

Invoke a ZStack API.

Parameters:

  • api_name (str): API name

  • parameters (dict): API parameters

4. search_metric

Search available monitoring metrics.

Parameters:

  • keywords (list[str]): Search keywords

  • namespace (str, optional): Fuzzy namespace filter, such as vm or host

  • limit (int, default: 20): Maximum number of results

  • match_mode (str, default: or): Keyword matching mode: and or or

  • prefer_namespaces (list[str], optional): Namespaces to rank first; defaults to ["ZStack/VM", "ZStack/Host"]

💡 If the namespace is unknown, omit it first. Search results include namespace values that can be used in a subsequent request.

The default match_mode is or. Pass and explicitly to require all keywords.

Metric names can overlap across namespaces. Specify namespace or prefer_namespaces to control result ranking.

5. get_metric_data

Retrieve monitoring data.

Parameters:

  • namespace (str): Namespace

  • metric_name (str): Metric name

  • start_time (str | int, optional): Start time as ISO text or a Unix timestamp in seconds

  • end_time (str | int, optional): End time as ISO text or a Unix timestamp in seconds

  • period (int, default: 60): Sampling period in seconds

  • labels (list[str] | dict, optional): Label filters such as ["VMUuid=xxx"] or {"VMUuid": "xxx"}

  • summary_only (bool, optional): Return only statistics: count, maximum, minimum, average, variance, and standard deviation

Response size guidance:

estimated_points = ceil((end_time - start_time) / period) * series_count

series_count is the number of unique label combinations. Omitting labels can return multiple series. Reduce output size by shortening the time range, increasing period, or adding label filters.

6. get_metric_summary

Retrieve aggregated Top-N metric results grouped by a label key.

Parameters:

  • namespace (str): Namespace

  • metric_name (str): Metric name

  • label_key (str): Grouping label, such as VMUuid or HostUuid

  • metric_names (list[str], optional): Metrics to combine, such as inbound and outbound metrics

  • start_time (str | int, optional): Start time as ISO text or a Unix timestamp in seconds

  • end_time (str | int, optional): End time as ISO text or a Unix timestamp in seconds

  • period (int, default: 60): Sampling period in seconds

  • aggregate (str, default: max): Per-metric aggregation: max, avg, sum, or min

  • combine (str, default: sum): Multi-metric combination: sum, avg, max, or min

  • threshold_op (str, optional): Comparison operator: >, >=, <, <=, ==, or !=

  • threshold_value (number, optional): Threshold value

  • top_n (int, default: 10): Number of results

  • resolve_resource (str, optional): vm or host, used to resolve resource names

Query API condition syntax

For Query APIs, the conditions parameter supports these operators:

Operator

Meaning

Example

=

Equal

name=test

!=

Not equal

state!=Deleted

>

Greater than

cpuNum>4

>=

Greater than or equal

memorySize>=1073741824

<

Less than

createDate<2024-01-01

<=

Less than or equal

?=

Fuzzy match (LIKE; some versions use like)

name?=%test%

!?=

Fuzzy non-match

~=

Regular-expression match

name~=.*test.*

!~=

Regular-expression non-match

=null

Is null

description=null

!=null

Is not null

in

In list

state?=Running,Stopped

not in

Not in list

state!?=Deleted,Destroyed

conditions format:

{
  "conditions": [
    {"name": "uuid", "op": "=", "value": "xxx"},
    {"name": "state", "op": "in", "value": "Running,Stopped"}
  ]
}

Example interaction

User: "Show me the details of the VM whose UUID starts with ae6e57a0."

The AI assistant will:

  1. Call search_api(keywords=["Query", "Vm", "Instance"])

  2. Call describe_api(api_name="QueryVmInstance")

  3. Call execute_api(api_name="QueryVmInstance", parameters={"conditions": [{"name": "uuid", "op": "?=", "value": "ae6e57a0%"}]})

Development

# Clone the repository
git clone https://github.com/ZSvirt/zsvirt-mcp-server.git
cd zsvirt-mcp-server

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

License

MIT

Available Tools

6 tools
describe_apiA

čŽˇå–æŒ‡åŽš ZStack API įš„č¯Ļįģ†å‚æ•°č¯´æ˜Ž

Args: api_name: API åį§°īŧŒåĻ‚ "QueryVmInstance"

Returns: API įš„į˛žįŽ€äŋĄæ¯ã€‚寚äēŽ Query APIīŧŒäģ…čŋ”回核åŋƒå‚æ•°å’Œ queryableFields。

ParametersJSON Schema
NameRequiredDescriptionDefault
api_nameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the transparency burden. It does disclose the return behavior, noting that Query APIs return only core parameters and queryableFields, which is useful context beyond the tool name. However, it does not mention potential errors, authentication needs, or other behavioral traits, leaving some gaps.

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?

The description is compact and well-structured, with a clear purpose statement followed by Args and Returns sections. Each sentence earns its place, and the example parameter value makes the usage instantly understandable.

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 one-parameter tool with an output schema, the description is largely complete. It covers the purpose, parameter meaning, and return behavior. It could be slightly stronger by clarifying why a user would choose describe_api over search_api, but that is more of a usage-guideline gap than a completeness issue.

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 compensate. It explains that api_name is an API name and gives a concrete example, which is sufficient for this single-parameter tool. More detail about accepted formats or validation rules would push it higher, but the provided semantics are clear.

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 clearly states the tool fetches detailed parameter documentation for a specified ZStack API, using a specific verb and resource. However, it does not explicitly differentiate itself from siblings like search_api or execute_api beyond the tool name.

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 description implies the tool is used when you already know the API name and need its parameter details, illustrated by the example "QueryVmInstance". There is no explicit guidance on when to prefer this tool over search_api or execute_api, so usage context is only implicit.

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

execute_apiA

æ‰§čĄŒ ZStack API

æŗ¨æ„: éģ˜čޤåĒå…čŽ¸č°ƒį”¨åĒč¯ģ APIīŧˆQuery/Get/List į­‰īŧ‰ã€‚ åĻ‚éœ€č°ƒį”¨å†™æ“äŊœ APIīŧŒč¯ˇčŽžįŊŽįޝåĸƒå˜é‡ ZSTACK_ALLOW_ALL_API=true

Args: api_name: API åį§°īŧŒåĻ‚ "QueryVmInstance" parameters: API 参数字典 寚äēŽ Query APIīŧŒconditions æ ŧåŧä¸ē: [{"name": "字æŽĩ名", "op": "操äŊœįŦĻ", "value": "å€ŧ"}, ...] 分éĄĩ: limitīŧˆéģ˜čޤ 50īŧ‰ã€startīŧˆåį§ģ量īŧ‰ 字æŽĩ选拊: fieldsīŧˆå‡å°‘čŋ”回数捎量īŧ‰

Returns: API æ‰§čĄŒį쓿žœ (JSON æ ŧåŧ)

Example: execute_api( api_name="QueryVmInstance", parameters={ "conditions": [ {"name": "uuid", "op": "like", "value": "ae6e57a0%"} ] } )

ParametersJSON Schema
NameRequiredDescriptionDefault
api_nameYes
parametersYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the critical safety trait that only read-only APIs are allowed by default and that write operations require an explicit environment variable. It also states the return format (JSON) and documents pagination/field-selection behavior, which goes beyond the sparse schema. It could add error behavior or mutation warnings, but the key behavioral constraints are covered.

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?

The description is well-structured with a short purpose, a critical safety note, clearly labeled Args, Returns, and Example sections. Every part adds value: the read-only guard is front-loaded, the conditions format is essential, and the example demonstrates realistic usage. There is no fluff or repetition.

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 generic executor with an open-ended parameters object and no annotations, the description provides the essential information: how to name an API, how to format query conditions, pagination/field controls, and the default write restriction. It is slightly incomplete regarding non-query API parameter conventions and possible error behaviors, but the example and Query API details make it sufficiently complete for common use.

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 compensate. It does so by explaining api_name with an example and by detailing the parameters dict, including the conditions array format, default limit, offset, and fields selection. This adds substantial meaning beyond the bare schema. It does not document parameter formats for write APIs, but the generic nature of the tool makes exhaustive documentation impractical.

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 clearly identifies the action ('æ‰§čĄŒ ZStack API' / execute ZStack API) and the target resource (ZStack API), with a concrete example (QueryVmInstance). It does not explicitly contrast itself with siblings like search_api or describe_api, so it misses the top tier for sibling differentiation, but the intended purpose is unambiguous.

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 description gives clear operational guidance: read-only APIs are allowed by default, and write APIs require setting ZSTACK_ALLOW_ALL_API=true. It also explains Query API conditions and pagination defaults, which helps an agent use the tool correctly. However, it does not explicitly state when this tool should be used instead of sibling tools, nor when to avoid it, leaving usage context mostly implied.

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

get_metric_dataA

čŽˇå– ZStack į›‘æŽ§æ•°æŽ

Args: namespace: å‘Ŋ名įŠē间īŧŒåĻ‚ "ZStack/VM", "ZStack/Host" metric_name: æŒ‡æ ‡åį§°īŧŒåĻ‚ "CPUUsedUtilization" start_time: åŧ€å§‹æ—ļ间īŧˆISO æˆ–į§’įē§æ—ļé—´æˆŗīŧ‰ end_time: į쓿Ÿæ—ļ间īŧˆISO æˆ–į§’įē§æ—ļé—´æˆŗīŧ‰ period: é‡‡æ ˇå‘¨æœŸ(į§’)īŧŒéģ˜čޤ 60 labels: æ ‡į­žčŋ‡æģ¤īŧŒåĻ‚ ["VMUuid=xxx"] 或 {"VMUuid":"xxx"} summary_only: äģ…čŋ”回įģŸčŽĄäŋĄæ¯īŧˆį‚šæ•°/最大/最小/åšŗå‡/æ–šåˇŽ/æ ‡å‡†åˇŽīŧ‰

æŗ¨æ„: čŋ”回数捎量与æ—ļ间跨åēĻ和 period æˆæ­Ŗæ¯”ã€‚å¯į”¨äŧ°įŽ—å…Ŧåŧ: į‚šæ•° ≈ ceil((end_time - start_time) / period) * series_count series_count ä¸ē不同 label įģ„合数量īŧ›č‹Ĩ不äŧ  labelsīŧŒå¯čƒŊčŋ”回多įģ„įŗģ列 īŧˆäž‹åĻ‚æŒ‡æ ‡åŒ…åĢ CPUNum/VMUuid į­‰ label æ—ļ每ä¸Ēįģ„合éƒŊäŧšäē§å‡ē一įģ„åēåˆ—īŧ‰ã€‚ ä¸ēéŋå…čž“å‡ēčŋ‡å¤§īŧšįŧŠįŸ­æ—ļé—´čŒƒå›´ã€åĸžå¤§ period 或åĸžåŠ  labels čŋ‡æģ¤ã€‚

Returns: į›‘æŽ§æ•°æŽį‚šåˆ—čĄ¨

ParametersJSON Schema
NameRequiredDescriptionDefault
labelsNo
periodNo
end_timeNo
namespaceYes
start_timeNo
metric_nameYes
summary_onlyNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses output-size scaling with a formula, explains multi-series behavior when labels are omitted, and gives practical warnings for avoiding overly large responses. It does not cover auth, timeout, or error behavior, but for a read-only metric query it is fairly transparent.

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 structure is clear and purposeful: a one-line purpose, an Args section covering all parameters, and a valuable note about output size. The length is justified for a 7-parameter tool with no schema descriptions, though the Returns section adds little beyond what an output schema would already provide.

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 7 parameters, no annotations, and an output schema present, the description covers the essential call semantics, data-volume behavior, and return type. Remaining gaps are minor: behavior when start_time/end_time are omitted, and the exact effect of summary_only on the returned structure.

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?

Schema description coverage is 0%, but the description compensates completely by explaining every parameter with examples, units, defaults, and format notes. It also clarifies labels and summary_only semantics beyond the schema, and the volume formula gives practical meaning to start_time, end_time, and period.

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 opens with 'čŽˇå– ZStack į›‘æŽ§æ•°æŽ' (get ZStack monitoring data), naming a clear verb and resource. It does not explicitly contrast with siblings like get_metric_summary or search_metric, so differentiation is inferred from names 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 is given on when to use this tool versus alternatives such as get_metric_summary or search_metric. The description focuses on how to use parameters and warns about output size, but it never states when this tool is the right choice or when to prefer a sibling.

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

get_metric_summaryB

čŽˇå–į›‘æŽ§æŒ‡æ ‡įš„čšåˆ TopNīŧˆæŒ‰ label_key 分įģ„īŧ‰

Args: namespace: å‘Ŋ名įŠē间īŧŒåĻ‚ "ZStack/VM", "ZStack/Host" metric_name: æŒ‡æ ‡åį§°īŧŒåĻ‚ "CPUOccupiedByVm" label_key: æ ‡į­žé”ŽīŧŒåĻ‚ "VMUuid", "HostUuid" metric_names: 可选īŧŒå¤šæŒ‡æ ‡åˆåšļīŧˆåĻ‚ in/outīŧ‰ start_time: åŧ€å§‹æ—ļ间īŧˆISO æˆ–į§’įē§æ—ļé—´æˆŗīŧ‰ end_time: į쓿Ÿæ—ļ间īŧˆISO æˆ–į§’įē§æ—ļé—´æˆŗīŧ‰ period: é‡‡æ ˇå‘¨æœŸ(į§’)īŧŒéģ˜čޤ 60 aggregate: å•æŒ‡æ ‡čšåˆæ–šåŧīŧŒå¯é€‰ "max"|"avg"|"sum"|"min" combine: 多指标合åšļæ–šåŧīŧŒå¯é€‰ "sum"|"avg"|"max"|"min" threshold_op: 阈å€ŧæ¯”čžƒįŦĻīŧŒåĻ‚ >,>=,<,<=,==,!= threshold_value: 阈å€ŧ数å€ŧ top_n: čŋ”å›žæĄæ•°īŧŒéģ˜čޤ 10 resolve_resource: 可选 "vm" 或 "host"īŧŒį”¨äēŽč§Ŗæžåį§°

Returns: čšåˆåŽįš„ TopN åˆ—čĄ¨

ParametersJSON Schema
NameRequiredDescriptionDefault
top_nNo
periodNo
combineNosum
end_timeNo
aggregateNomax
label_keyYes
namespaceYes
start_timeNo
metric_nameYes
metric_namesNo
threshold_opNo
threshold_valueNo
resolve_resourceNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states that it retrieves aggregated TopN values, but does not say whether the call is read-only, what happens when start_time/end_time are omitted, whether threshold filtering is applied before or after aggregation, or how pagination/limits behave.

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 structure is compact and effective: a precise summary line, a well-organized Args list, and a short Returns line. Every entry earns its place, and the parameter list is scannable. It loses one point because the Returns section is extremely terse, though an output schema exists to fill that gap.

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?

Given the tool's complexity (13 parameters, no annotations, 0% schema coverage), the description covers parameter semantics well but leaves critical contextual gaps: when to use it versus sibling tools, whether time ranges are required, and how the TopN grouping behaves. It is a usable but incomplete definition.

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?

Schema description coverage is 0%, so the description must compensate. It does so thoroughly: every one of the 13 parameters gets context, including concrete examples for namespace and metric_name, allowed values for aggregate and combine, format guidance for time parameters, and defaults for period and top_n. This is exactly the kind of compensation needed.

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 one-line summary states a specific verb and resource: fetch aggregated TopN metric values grouped by a label_key. It is clear about the operation, but it does not explicitly differentiate itself from siblings like get_metric_data or search_metric; it relies on the phrase 'aggregated TopN' to imply the distinction.

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?

The description gives no guidance on when to prefer this tool over alternatives such as get_metric_data or search_metric. It lists parameters and return type, but never states the conditions, prerequisites, or scenarios for which this tool is the right choice.

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

search_apiA

æ šæŽå…ŗé”Žč¯æœį´ĸ ZStack API

Args: keywords: 搜į´ĸå…ŗé”Žč¯åˆ—čĄ¨īŧŒåĻ‚ ["Query", "Vm"] 或 ["Create", "Volume"] 支持éŠŧåŗ°æ‹†åˆ†åŒšé…īŧŒåĻ‚æœį´ĸ "vm" 可äģĨ匚配 "QueryVmInstance" category: 可选īŧŒæŒ‰åˆ†įąģčŋ‡æģ¤īŧŒåĻ‚ "vm", "volume", "network" limit: 最多čŋ”回数量īŧŒéģ˜čޤ 15

Returns: åŒšé…įš„ API åˆ—čĄ¨īŧŒåŒ…åĢåį§°ã€æčŋ°ã€åˆ†įąģã€č°ƒį”¨įąģ型

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
categoryNo
keywordsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden and largely meets it: it reveals the camelCase-splitting matching mode, optional category filtering, and the default cap of 15 results. It does not cover edge cases like empty results or case sensitivity, but for a read-only search tool the core behavioral traits are disclosed.

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?

The description consists of one front-loaded purpose line followed by compact Args and Returns sections. Every clause earns its place, and there is no repetition of schema structure, boilerplate, or redundant phrasing.

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 3-parameter search tool with an output schema, this is nearly complete: it covers purpose, matching behavior, all parameters, defaults, and return content. The only notable omissions are explicit sibling routing and edge-case behavior, which are minor at this complexity level.

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?

Schema description coverage is 0% — the input schema contains only titles and types. The Args section fully compensates by defining keywords as a list with camelCase matching, category as an optional filter, and limit as a max-return-count defaulting to 15, adding operational meaning the schema itself lacks.

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 'æ šæŽå…ŗé”Žč¯æœį´ĸ ZStack API' names a specific verb (search) and resource (ZStack API), and the Returns section clarifies that it yields API metadata (name, description, category, call type) rather than executing calls. This clearly differentiates it from siblings like execute_api and search_metric, whose targets are different.

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 description provides a concrete matching-behavior example ('vm' matches 'QueryVmInstance' via camelCase splitting), which helps an agent phrase queries effectively. However, it does not explicitly state when to prefer this tool over describe_api/execute_api or when to use search_metric instead; routing is left implied by sibling names rather than stated.

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

search_metricA

搜į´ĸå¯į”¨įš„ ZStack į›‘æŽ§æŒ‡æ ‡

Args: keywords: 搜į´ĸå…ŗé”Žč¯īŧŒåĻ‚ ["CPU", "Usage"] 或 ["Memory"] 支持éŠŧåŗ°æ‹†åˆ†åŒšé… namespace: 可选īŧŒæŒ‰å‘Ŋ名įŠē间čŋ‡æģ¤īŧˆæ”¯æŒæ¨ĄįŗŠåŒšé…īŧ‰īŧŒåĻ‚ "ZStack/VM", "vm", "host" limit: 最多čŋ”回数量īŧŒéģ˜čޤ 20 match_mode: å…ŗé”Žč¯åŒšé…æ¨ĄåŧīŧŒ"and" 或 "or"īŧŒéģ˜čޤ "or" prefer_namespaces: äŧ˜å…ˆæŽ’åēįš„å‘Ŋ名įŠēé—´åˆ—čĄ¨īŧˆéģ˜čޤ ["ZStack/VM","ZStack/Host"]īŧ‰

Returns: åŒšé…įš„į›‘æŽ§æŒ‡æ ‡åˆ—čĄ¨īŧŒåŒ…åĢåį§°ã€æčŋ°ã€å‘Ŋ名įŠēé—´ã€å¯į”¨æ ‡į­ž

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
keywordsYes
namespaceNo
match_modeNoor
prefer_namespacesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

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

Since no annotations are provided, the description carries the full behavioral burden. It discloses non-obvious behaviors: camel-case keyword splitting, fuzzy namespace matching, match_mode AND/OR logic, and prefer_namespaces sorting. These details give an agent a realistic model of how search results are filtered and ranked.

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?

The text is front-loaded with the core purpose, then organized under Args and Returns headings. Each line provides necessary operational detail (examples, defaults) without excessive fluff, making the definition scannable and efficient for an LLM to consume.

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?

Although an output schema exists, the description still summarizes return contents (name, description, namespace, available labels) and fully documents all five parameters, defaults, and matching/sorting behaviors. With no annotations and no schema-level descriptions, nothing essential is missing for correct invocation.

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?

Schema description coverage is 0%, so the description compensates completely. Every parameter—keywords, namespace, limit, match_mode, prefer_namespaces—has a format explanation, examples, and defaults. For instance, keywords is shown with ['CPU', 'Usage'] and the camel-case splitting rule, and match_mode explicitly defines 'and'/'or' and the default.

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 statement: '搜į´ĸå¯į”¨įš„ ZStack į›‘æŽ§æŒ‡æ ‡' (search available ZStack monitoring metrics). It clearly identifies a search operation over a distinct resource (monitoring metrics), separating it from sibling tools like search_api or get_metric_data.

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?

Usage is implied through the name and purpose—searching available metrics before fetching data—but no explicit guidance is provided about when to choose this tool over siblings such as get_metric_data or get_metric_summary. There are no when-not or alternative conditions, leaving an agent to infer the positioning.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.6
    • First observeddescribe_api
    • First observedexecute_api
    • First observedget_metric_data
    • First observedget_metric_summary
    • First observedsearch_api
    • First observedsearch_metric

TDQS

A4.1/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: search_api/describe_api/execute_api form an API discovery-to-execution pipeline, while search_metric/get_metric_data/get_metric_summary form a metrics retrieval pipeline. Even the two 'search' tools are unambiguously separated by their targets (APIs vs metrics).

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern: search_, describe_, execute_, get_. The repetition of 'search' and 'get' is intentional and predictable, with the noun disambiguating the target.

Tool Count5/5

Six tools is a well-scoped count for a server focused on two complementary workflows: API introspection/execution and metric querying. Each tool earns its place without redundancy or bloat.

Completeness5/5

The API workflow is complete with search, describe, and execute, covering discovery through invocation. The metrics workflow is also complete with search, raw data retrieval, and aggregated summary, with no obvious dead ends or missing operations.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables comprehensive management of CloudStack infrastructure through natural language, providing access to over 735 API methods for virtual machines, networking, and storage. It features enterprise-grade security with a safety confirmation system for destructive operations and extensive API coverage.
    -
  • A
    license
    C
    quality
    B
    maintenance
    Enables deploying and managing infrastructure via natural language, including project/domain management, compute nodes, image deployment, and CI/CD integration.
    70
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI to dynamically search, describe, and execute 2000+ ZStack Cloud APIs, plus query monitoring metrics and data.
    6
    11
    MIT