Skip to main content
Glama

send_platform_message

Send messages via AstrBot's Web Chat API, supporting text, images, files, and multimedia content across platforms.

Instructions

通过 AstrBot 的 Web Chat API 发送消息链(支持文本、图片、文件等)。

参数:

  • platform_id: 平台 ID,例如 "webchat" 或配置中的平台 ID。

  • message_chain: 消息链,由 MessagePart 列表组成。

    • 文本: {"type": "plain", "text": "..."}

    • 回复: {"type": "reply", "message_id": "..."}

    • 图片/文件/语音/视频: {"type": "image"|"file"|"record"|"video", "file_path": "本地路径或URL"} 或 {"type": "...", "url": "http(s) URL"}

  • message / images / files / videos / records: 可选便捷参数;当未传 message_chain 时,会自动拼成消息链。

  • session_id: 可选的平台会话 ID;如果为空,会自动为该平台创建新会话。

  • selected_provider / selected_model: 可选,指定 AstrBot 内部的 provider/model。

  • enable_streaming: 是否启用流式回复(影响 AstrBot 返回的 SSE 事件类型)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platform_idYes
message_chainNo
messageNo
imagesNo
filesNo
videosNo
recordsNo
target_idNo
message_typeNoGroupMessage
session_idNo
conversation_idNo
use_last_sessionNo
new_sessionNo
reply_to_message_idNo
reply_to_last_saved_messageNo
reply_to_last_user_messageNo
selected_providerNo
selected_modelNo
enable_streamingNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/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 describes the tool's core functionality (sending message chains) and mentions some behavioral aspects: optional parameters that auto-build message chains, automatic session creation if session_id is empty, and that enable_streaming affects SSE event types. However, it doesn't cover important behavioral traits like whether this is a read-only or destructive operation, rate limits, authentication requirements, error conditions, or what the response looks like.

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 well-structured with a clear purpose statement followed by parameter explanations. It's appropriately sized for a complex tool with 19 parameters. Most sentences add value, though some parameter explanations could be more concise. The information is front-loaded with the core purpose first.

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 (19 parameters, no annotations, 0% schema description coverage, but with output schema), the description is moderately complete. It explains the core functionality and many parameters but leaves 8 parameters undocumented. The existence of an output schema means the description doesn't need to explain return values, but for a mutation tool with no annotations and poor schema documentation, more behavioral context would be helpful.

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?

With 0% schema description coverage, the description must compensate for the schema's lack of parameter documentation. The description provides meaningful semantic information for 7 parameters (platform_id, message_chain, message, images, files, videos, records, session_id, selected_provider, selected_model, enable_streaming), explaining what they represent and how they interact. However, it doesn't cover the remaining 8 parameters (target_id, message_type, conversation_id, use_last_session, new_session, reply_to_message_id, reply_to_last_saved_message, reply_to_last_user_message), leaving significant gaps.

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 clearly states the tool's purpose: '通过 AstrBot 的 Web Chat API 发送消息链(支持文本、图片、文件等)' which translates to 'Send message chains via AstrBot's Web Chat API (supports text, images, files, etc.)'. It specifies the verb 'send', the resource 'message chains', and the mechanism 'AstrBot's Web Chat API'. It also distinguishes from sibling 'send_platform_message_direct' by implying this is the standard API-based method.

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?

The description provides clear context for usage: it's for sending messages via AstrBot's Web Chat API. It mentions alternative parameters ('message / images / files / videos / records') that can be used instead of 'message_chain' for convenience. However, it doesn't explicitly state when to use this tool versus the sibling 'send_platform_message_direct', nor does it mention any prerequisites or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xunxiing/astrbotmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server