TOOL API

slide_add_shape

Inserts a preset shape (rect, ellipse, triangle, etc.) onto a given slide. At least one of fill_color or border_color must be set, otherwise the shape is invisible and the call is rejected. This tool only supports fixed-direction preset arrow blocks (rightArrow / leftArrow); to draw a directional arrow line between two points, use slide_add_line_shape with line_type=arrow or doubleArrow instead. When the user asks to "add an arrow", first ask whether they want a line arrow (with start and end points) or a shape arrow (fixed-direction block) before choosing the tool. page_index is 0-based; x/y/w/h are in points (pt, 1pt = 12700 EMU); fill_alpha and border_alpha range from 0 to 100; border_width is in pt. If both tencent-docs (personal) and tencent-docs-oa (enterprise) are connected, use AskUserQuestion to let the user pick the target account before invoking this tool.

productivityOAuth1 credits

Call information

Tool slug
tencent-docs.slide_add_shape
Provider
Tencent Docs
Average response
0 ms
Calls in 7 days
0

Input parameters

border_alpha

边框透明度 0~100,0=完全不透明(默认),100=完全透明(去掉边框);仅 (0, 100) 开区间才显式写入 alpha

border_color

边框颜色(RRGGBB);空串表示无边框;传 "none" 移除边框)

border_dash

边框线型,如 solid / dash / dot;空串默认 solid

border_width

边框宽度(pt);<= 0 取默认 1.0

file_id

文档ID,与 file_url 二选一

file_url

在线幻灯片URL,与 file_id 二选一

fill_alpha

创建形状时的填充透明度,仅支持 0~50;0=完全不透明(默认)。如需设置 51~100,先创建形状,再调用 slide_set_shape_properties 修改

fill_color

填充颜色(RRGGBB,无 # 前缀);空串表示无填充

h

形状高度(磅 pt,1pt = 12700 EMU),必须 > 0

page_index

目标幻灯片页索引,从 0 开始

shape_type

形状预设类型,如 rect / ellipse / triangle / rightArrow / leftArrow 等;空串默认 rect。注意:rightArrow / leftArrow 是固定方向的图形预设箭头块,不能指定起点终点;如需画两点之间的方向性箭头线条,请改用 slide_add_line_shape

w

形状宽度(磅 pt,1pt = 12700 EMU),必须 > 0

x

形状左上角横坐标(磅 pt,1pt = 12700 EMU)

y

形状左上角纵坐标(磅 pt,1pt = 12700 EMU)