Skip to main content
Glama
leolulu

siyuan-mcp-server

by leolulu

push_error_message

Display an error message on the frontend when validation or API calls fail. Provide the message text and optional display duration to alert users immediately.

Instructions

推送前台错误消息。

适用场景: - 在参数校验或接口调用失败时向前台反馈错误。

注意事项: - msg 必须是非空字符串。 - timeout 必须是正整数毫秒值。

Args: msg: 错误消息内容。 timeout: 消息显示时长(毫秒),默认 7000。

Returns: Dict[str, Any]: 包含消息 id 的字典。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
msgYes
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.31.0

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It does state constraints (msg non-empty, timeout positive integer) and the return shape, but it does not disclose failure behavior, side effects, persistence, or any safety profile. For a tool that pushes messages to the frontend, this is a notable gap.

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 efficiently organized with purpose, use-case scenarios, notes, args, and returns. It front-loads the core purpose and every sentence contributes information without 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 simple 2-parameter utility, the description covers purpose, use cases, parameter semantics, validation constraints, and return type. The output schema is also provided. The main omissions are explicit failure semantics and a clearer contrast with push_message, but given the low complexity, the description is largely complete.

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%, but the description fully compensates by defining each parameter in plain terms: msg as the error message content and timeout as the display duration in milliseconds with a default of 7000. It also adds validation constraints beyond the schema, making the parameters well-understood.

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 a specific verb–object pair ('推送前台错误消息') and adds error-specific context ('参数校验或接口调用失败'), which clearly distinguishes it from the general sibling push_message. It stops short of naming the alternative explicitly, so it is clear but not fully differentiated by sibling comparison.

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?

An '适用场景' section explicitly states when to use the tool: when parameter validation or API calls fail. This provides clear contextual guidance. However, it does not state when not to use it or mention the alternative push_message, so the guidance is not exhaustive.

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