Skip to main content
Glama
ZSvirt

zsvirt-mcp-server

Official
by ZSvirt

ZSvirt MCP Server

Ein MCP-Server, der es KI ermöglicht, dynamisch auf über 2000+ APIs von ZSvirt zuzugreifen und diese aufzurufen.

Funktionen

  • API-Suche: Durchsucht ZStack-APIs nach Schlüsselwörtern, unterstützt unscharfe Übereinstimmung

  • API-Beschreibung: Ruft detaillierte Parameterbeschreibungen für APIs ab

  • API-Ausführung: Führt ZStack-APIs aus und gibt Ergebnisse zurück

  • Metrik-Suche: Durchsucht verfügbare Überwachungsmetriken

  • Metrik-Datenabruf: Ruft Überwachungsdaten für angegebene Metriken ab

Related MCP server: CloudStack MCP Server

Installation

# 从 PyPI 安装
pip install zsvirt-mcp-server

# 或者使用 uv
uv pip install zsvirt-mcp-server

💡 Sie können es auch ohne Installation direkt mit uvx oder pipx run ausführen (siehe Verwendung unten)

Konfiguration

Legen Sie die folgenden Umgebungsvariablen fest:

export ZSTACK_API_URL="http://localhost:8080"  # ZStack API 地址
export ZSTACK_ALLOW_ALL_API="false"             # 是否允许写操作(可选,默认 false)

# 认证方式一:用户名密码(会自动登录获取 Session)
export ZSTACK_ACCOUNT="admin"                   # 账户名
export ZSTACK_PASSWORD="your-password"          # 密码(明文)

# 认证方式二:直接传入 SessionID(优先级更高,设置后忽略用户名密码)
export ZSTACK_SESSION_ID="your-session-uuid"    # 已有的 Session UUID

# 查询响应控制(可选)
export ZSTACK_QUERY_DEFAULT_LIMIT="50"          # Query API 默认 limit(设 0 禁用)
export ZSTACK_RESPONSE_SIZE_LIMIT="65536"       # 响应大小上限,字节(设 0 禁用)

Authentifizierungsmethoden

Methode

Umgebungsvariable

Beschreibung

Benutzername/Passwort

ZSTACK_ACCOUNT + ZSTACK_PASSWORD

Automatische Anmeldung zum Abrufen der Session

Session-ID

ZSTACK_SESSION_ID

Direkte Verwendung einer vorhandenen Session (höhere Priorität)

💡 Wenn sowohl ZSTACK_SESSION_ID als auch Benutzername/Passwort festgelegt sind, wird die Session-ID bevorzugt verwendet

Sicherheitshinweis

Standardmäßig sind nur schreibgeschützte APIs erlaubt, einschließlich:

  • Query* - Abfrageklasse

  • Get* - Abrufklasse

  • List* - Listenklasse

  • Describe* - Beschreibungsklasse

  • Check* - Prüfklasse

  • Count* - Zählklasse

  • Andere schreibgeschützte Operationen...

Um Schreiboperationen (z. B. CreateVmInstance, DeleteVolume usw.) aufzurufen, müssen Sie Folgendes festlegen:

export ZSTACK_ALLOW_ALL_API="true"

⚠️ Warnung: Nach Aktivierung von Schreiboperationen kann die KI gefährliche Aktionen wie Erstellen, Löschen und Ändern ausführen. Bitte vorsichtig verwenden!

Steuerung der Abfrageantworten

Query-APIs injizieren standardmäßig limit=50, um zu verhindern, dass das Abrufen aller Daten das Modellkontextfenster überlastet. Antworten über 64KB werden automatisch in der Inventarliste gekürzt, um gültiges JSON zu gewährleisten.

Umgebungsvariable

Standardwert

Beschreibung

ZSTACK_QUERY_DEFAULT_LIMIT

50

Standardwert, der automatisch injiziert wird, wenn Query-APIs kein limit angeben. Auf 0 setzen zum Deaktivieren

ZSTACK_RESPONSE_SIZE_LIMIT

65536

Antwortgrößenlimit (Bytes). Wird bei Überschreitung gekürzt. Auf 0 setzen zum Deaktivieren

  • Ein explizit übergebenes limit wird nicht überschrieben

  • Bei Kürzung enthält die Antwort das Feld _truncation, das auf die Verwendung von limit/start für die Paginierung oder fields zur Reduzierung der zurückgegebenen Felder hinweist

Verwendung

Als MCP-Server ausführen

# 使用 uvx 直接运行(无需安装)
uvx zsvirt-mcp-server

# 或使用 pipx
pipx run zsvirt-mcp-server

# 如果已安装,直接运行
zsvirt-mcp-server

SSE-Modus

Standardmäßig wird stdio-Transport verwendet. Für den SSE-Modus können Sie über die Befehlszeile oder Umgebungsvariablen wechseln:

# 命令行方式
uvx zsvirt-mcp-server --transport sse --host 0.0.0.0 --port 8000

# 环境变量方式
export MCP_TRANSPORT="sse"
export MCP_HOST="0.0.0.0"
export MCP_PORT="8000"
export MCP_PATH="/sse"  # 可选
uvx zsvirt-mcp-server

Hinweis: Kompatibel mit FASTMCP_HOST / FASTMCP_PORT / FASTMCP_MOUNT_PATH (native FastMCP-Umgebungsvariablen)

Streamable-HTTP-Modus

# 命令行方式
uvx zsvirt-mcp-server --transport streamable-http --host 0.0.0.0 --port 8000 --streamable-path /mcp

# 环境变量方式
export MCP_TRANSPORT="streamable-http"
export MCP_HOST="0.0.0.0"
export MCP_PORT="8000"
export MCP_STREAMABLE_PATH="/mcp"  # 可选
uvx zsvirt-mcp-server

Hinweis: Kompatibel mit FASTMCP_STREAMABLE_HTTP_PATH

HTTP-Header-Authentifizierung (Multi-Tenant-Modus)

Im SSE- oder streamable-http-Modus kann ein Administrator einen gemeinsamen MCP-Server starten, und mehrere Benutzer übergeben ihre eigenen Anmeldeinformationen über HTTP-Header, um eine Mandantentrennung zu erreichen.

Unterstützte HTTP-Header:

HTTP-Header

Entsprechende Umgebungsvariable

Beschreibung

X-ZStack-Account

ZSTACK_ACCOUNT

Kontoname

X-ZStack-Password

ZSTACK_PASSWORD

Passwort

X-ZStack-Session-Id

ZSTACK_SESSION_ID

Vorhandene Session (höhere Priorität als Kontoname/Passwort)

X-ZStack-API-URL

ZSTACK_API_URL

ZStack-Verwaltungsknotenadresse (ermöglicht Proxy für mehrere Umgebungen)

Priorität der Anmeldeinformationen: HTTP-Header > Umgebungsvariablen

Typische Verwendung:

# 管理员启动共享 MCP Server
ZSTACK_ALLOW_ALL_API=false uvx zsvirt-mcp-server --transport streamable-http --host 0.0.0.0 --port 8000

Benutzer können ihre eigenen Konten verwenden, indem sie HTTP-Header in der MCP-Client-Konfiguration hinzufügen:

{
  "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"
      }
    }
  }
}

Eigenschaften:

  • Sessions desselben Kontos werden automatisch zwischengespeichert und wiederverwendet, es wird nicht bei jeder Anfrage eine neue Session erstellt

  • Anfragen mit unterschiedlichen X-ZStack-API-URL werden an verschiedene ZStack-Umgebungen weitergeleitet

  • Im stdio-Modus gibt es keine HTTP-Header, es wird automatisch auf die Umgebungsvariablen-Authentifizierung zurückgegriffen, das Verhalten bleibt unverändert

Konfiguration in Claude Desktop

Fügen Sie in claude_desktop_config.json Folgendes hinzu:

Methode 1: Benutzername/Passwort verwenden

{
  "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"
      }
    }
  }
}

Methode 2: Session-ID verwenden

{
  "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"
      }
    }
  }
}

💡 Setzen Sie ZSTACK_ALLOW_ALL_API auf "true", um Schreiboperationen (Erstellen/Löschen/Ändern usw.) zu aktivieren

Verfügbare Werkzeuge

Durchsucht ZStack-APIs nach Schlüsselwörtern.

Parameter:

  • keywords (list[str]): Suchschlüsselwörter, z. B. ["Query", "Vm"]

  • category (str, optional): Nach Kategorie filtern

  • limit (int, Standard 15): Maximale Anzahl der zurückgegebenen Ergebnisse

2. describe_api

Ruft die detaillierte Parameterbeschreibung einer bestimmten API ab.

Parameter:

  • api_name (str): API-Name, z. B. "QueryVmInstance"

3. execute_api

Führt eine ZStack-API aus.

Parameter:

  • api_name (str): API-Name

  • parameters (dict): API-Parameter

Durchsucht verfügbare Überwachungsmetriken.

Parameter:

  • keywords (list[str]): Suchschlüsselwörter

  • namespace (str, optional): Nach Namespace filtern (unterstützt unscharfe Übereinstimmung, z. B. vm/host)

  • limit (int, Standard 20): Maximale Anzahl der zurückgegebenen Ergebnisse

  • match_mode (str, Standard or): Schlüsselwort-Übereinstimmungsmodus (and/or)

  • prefer_namespaces (list[str], optional): Bevorzugte Namespace-Liste für die Sortierung (Standard ["ZStack/VM","ZStack/Host"])

💡 Tipp: Wenn Sie sich über den Namespace nicht sicher sind, können Sie ihn zunächst weglassen. Die zurückgegebenen Ergebnisse enthalten den Namespace-Wert zur Auswahl 💡 Standard match_mode=or (ODER-Verknüpfung mehrerer Schlüsselwörter); für UND-Verknüpfung übergeben Sie explizit and 💡 Metriknamen können in verschiedenen Namespaces doppelt vorkommen. Es wird empfohlen, namespace oder prefer_namespaces anzugeben, um eine korrekte Sortierung sicherzustellen

5. get_metric_data

Ruft Überwachungsdaten ab.

Parameter:

  • namespace (str): Namespace

  • metric_name (str): Metrikname

  • start_time (str|int, optional): Startzeit (ISO oder Sekunden-Timestamp)

  • end_time (str|int, optional): Endzeit (ISO oder Sekunden-Timestamp)

  • period (int, Standard 60): Abtastintervall (Sekunden)

  • labels (list[str]|dict, optional): Label-Filter, z. B. ["VMUuid=xxx"] oder {"VMUuid":"xxx"}

  • summary_only (bool, optional): Nur Zusammenfassung zurückgeben (Punktanzahl/Maximum/Minimum/Durchschnitt/Varianz/Standardabweichung)

Datenmengen-Hinweis:

  • Geschätzte Punktanzahl: ceil((end_time - start_time) / period) * series_count

  • series_count ist die Anzahl der verschiedenen Label-Kombinationen; ohne labels können mehrere Serien zurückgegeben werden

  • Es wird empfohlen, den Zeitraum zu verkürzen, period zu vergrößern oder labels zur Filterung hinzuzufügen, um zu große Ausgaben zu vermeiden

6. get_metric_summary

Ruft die aggregierten TopN-Werte einer Überwachungsmetrik ab (gruppiert nach label_key).

Parameter:

  • namespace (str): Namespace

  • metric_name (str): Metrikname

  • label_key (str): Label-Schlüssel, z. B. VMUuid/HostUuid

  • metric_names (list[str], optional): Zusammenführung mehrerer Metriken (z. B. ein/aus)

  • start_time (str|int, optional): Startzeit (ISO oder Sekunden-Timestamp)

  • end_time (str|int, optional): Endzeit (ISO oder Sekunden-Timestamp)

  • period (int, Standard 60): Abtastintervall (Sekunden)

  • aggregate (str, Standard max): Aggregationsmethode für einzelne Metriken (max/avg/sum/min)

  • combine (str, Standard sum): Zusammenführungsmethode für mehrere Metriken (sum/avg/max/min)

  • threshold_op (str, optional): Schwellwert-Vergleichsoperator (>,>=,<,<=,==,!=)

  • threshold_value (number, optional): Schwellwert

  • top_n (int, Standard 10): Anzahl der zurückzugebenden Einträge

  • resolve_resource (str, optional): vm oder host, zur Auflösung von Namen

Syntax für Query-API-Bedingungen

Für Query-APIs unterstützt der Parameter conditions die folgenden Operatoren:

Operator

Bedeutung

Beispiel

=

Gleich

name=test

!=

Ungleich

state!=Deleted

>

Größer als

cpuNum>4

>=

Größer oder gleich

memorySize>=1073741824

<

Kleiner als

createDate<2024-01-01

<=

Kleiner oder gleich

?=

Unscharfe Übereinstimmung (LIKE, in einigen Versionen like)

name?=%test%

!?=

Unscharfe Nicht-Übereinstimmung

~=

Regulärer Ausdruck

name~=.*test.*

!~=

Regulärer Ausdruck (Negation)

=null

Ist leer

description=null

!=null

Ist nicht leer

in

In der Liste

state?=Running,Stopped

not in

Nicht in der Liste

state!?=Deleted,Destroyed

Format von conditions:

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

Beispielinteraktion

Benutzer fragt: "Kannst du mir die Details der VM abrufen, deren UUID mit ae6e57a0 beginnt?"

Die KI wird:

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

  2. describe_api(api_name="QueryVmInstance") aufrufen

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

Entwicklung

# 克隆仓库
git clone https://github.com/ZSvirt/zsvirt-mcp-server/zsvirt-mcp-server.git
cd zsvirt-mcp-server

# 安装开发依赖
pip install -e ".[dev]"

# 运行测试
pytest

Lizenz

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