TOOL_SCHEMAS: readonly [
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: false;
title: "createSceneObjectFromJson";
};
description: "根据对象JSON来创建场景对象,必须符合格式 { type: string,id: string, ...}";
name: "createSceneObjectFromJson";
schema: ZodObject<
{
json: ZodObject<
{ id: ZodString; type: ZodString },
"passthrough",
ZodTypeAny,
objectOutputType<
{ id: ZodString; type: ZodString },
ZodTypeAny,
"passthrough",
>,
objectInputType<
{ id: ZodString; type: ZodString },
ZodTypeAny,
"passthrough",
>,
>;
},
"strip",
ZodTypeAny,
{ json: { id: string; type: string } & { [k: string]: unknown } },
{ json: { id: string; type: string } & { [k: string]: unknown } },
>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: false;
title: "destroySceneObject";
};
description: "提供对象id来删除单个或多个场景对象,把对象从场景中移除";
name: "destroySceneObject";
schema: ZodObject<
{ ids: ZodDefault<ZodArray<ZodString, "many">> },
"strip",
ZodTypeAny,
{ ids: string[] },
{ ids?: string[] },
>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: false;
title: "setSceneObjectProperty";
};
description: "设置指定对象的某个属性的值";
name: "setSceneObjectProperty";
schema: ZodObject<
{ id: ZodString; property: ZodString; value: ZodAny },
"strip",
ZodTypeAny,
{ id: string; property: string; value?: any },
{ id: string; property: string; value?: any },
>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: false;
title: "flyToSceneObject";
};
description: "提供对象id来控制相机视角飞行到指定对象,观察对象";
name: "flyToSceneObject";
schema: ZodObject<
{ id: ZodString },
"strip",
ZodTypeAny,
{ id: string },
{ id: string },
>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: true;
title: "getSceneObjectClasses";
};
description: "获取 EarthSDK 的所有对象类以及描述";
name: "getSceneObjectClasses";
schema: ZodObject<{}, "strip", ZodTypeAny, {}, {}>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: true;
title: "getSceneObjectClassProps";
};
description: "根据提供的对象类型 className 来获取对象有些什么属性";
name: "getSceneObjectClassProps";
schema: ZodObject<
{ className: ZodString },
"strip",
ZodTypeAny,
{ className: string },
{ className: string },
>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: true;
title: "getActiveViewer";
};
description: "获取当前视口对象JSON";
name: "getActiveViewer";
schema: ZodObject<{}, "strip", ZodTypeAny, {}, {}>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: false;
title: "createSceneObjectFromUrl";
};
description: "根据提供的url地址创建场景对象";
name: "createSceneObjectFromUrl";
schema: ZodObject<
{ url: ZodString },
"strip",
ZodTypeAny,
{ url: string },
{ url: string },
>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: true;
title: "getSceneObjectJson";
};
description: "根据对象id获取该对象的JSON数据";
name: "getSceneObjectJson";
schema: ZodObject<
{ id: ZodString },
"strip",
ZodTypeAny,
{ id: string },
{ id: string },
>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: true;
title: "setSceneObjectJson";
};
description: "设置对象的JSON数据,覆盖当前对象";
name: "setSceneObjectJson";
schema: ZodObject<
{
json: ZodObject<
{ id: ZodString; type: ZodString },
"passthrough",
ZodTypeAny,
objectOutputType<
{ id: ZodString; type: ZodString },
ZodTypeAny,
"passthrough",
>,
objectInputType<
{ id: ZodString; type: ZodString },
ZodTypeAny,
"passthrough",
>,
>;
},
"strip",
ZodTypeAny,
{ json: { id: string; type: string } & { [k: string]: unknown } },
{ json: { id: string; type: string } & { [k: string]: unknown } },
>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: true;
title: "getSceneJson";
};
description: "获取当前场景JSON数据(所有对象)";
name: "getSceneJson";
schema: ZodObject<{}, "strip", ZodTypeAny, {}, {}>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: true;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: false;
title: "setSceneJson";
};
description: "设置整个场景JSON,覆盖当前场景";
name: "setSceneJson";
schema: ZodObject<
{
json: ZodObject<
{},
"passthrough",
ZodTypeAny,
objectOutputType<{}, ZodTypeAny, "passthrough">,
objectInputType<{}, ZodTypeAny, "passthrough">,
>;
},
"strip",
ZodTypeAny,
{ json: {} & { [k: string]: unknown } },
{ json: {} & { [k: string]: unknown } },
>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: true;
title: "downloadSceneJson";
};
description: "下载当前场景JSON数据";
name: "downloadSceneJson";
schema: ZodObject<{}, "strip", ZodTypeAny, {}, {}>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: true;
title: "downloadCaptureScreen";
};
description: "获取当前视口截图,直接下载";
name: "downloadCaptureScreen";
schema: ZodObject<
{
height: ZodDefault<ZodOptional<ZodNumber>>;
width: ZodDefault<ZodOptional<ZodNumber>>;
},
"strip",
ZodTypeAny,
{ height: number; width: number },
{ height?: number; width?: number },
>;
toolset: "SceneObject";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: false;
title: "flyToByLocation";
};
description: "提供 经度纬度高度 来控制相机视角飞行到指定位置,只提供地名时自动查询经纬度";
name: "flyToByLocation";
schema: ZodObject<
{
height: ZodDefault<ZodOptional<ZodNumber>>;
latitude: ZodNumber;
longitude: ZodNumber;
},
"strip",
ZodTypeAny,
{ height: number; latitude: number; longitude: number },
{ height?: number; latitude: number; longitude: number },
>;
toolset: "View";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: true;
title: "getCurrentCameraInfo";
};
description: "获取当前三维场景中相机的实时视角状态信息,包含位置信息(经度、纬度、高度)和姿态信息(航向角、俯仰角、翻滚角)";
name: "getCurrentCameraInfo";
schema: ZodObject<{}, "strip", ZodTypeAny, {}, {}>;
toolset: "View";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: false;
title: "setCameraHeading";
};
description: "设置相机旋转朝向(航向角 heading),控制相机在水平面的朝向。0度指向正北,90度指向正东";
name: "setCameraHeading";
schema: ZodObject<
{ heading: ZodNumber },
"strip",
ZodTypeAny,
{ heading: number },
{ heading: number },
>;
toolset: "View";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: false;
title: "setCameraPitch";
};
description: "设置相机俯仰角(pitch),控制相机在垂直方向上的俯仰角度。-90°表示相机垂直向下俯视地面";
name: "setCameraPitch";
schema: ZodObject<
{ pitch: ZodNumber },
"strip",
ZodTypeAny,
{ pitch: number },
{ pitch: number },
>;
toolset: "View";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: false;
title: "setCameraRoll";
};
description: "设置相机翻滚角(roll),控制相机绕自身视轴的翻滚旋转,影响画面的水平倾斜状态";
name: "setCameraRoll";
schema: ZodObject<
{ roll: ZodNumber },
"strip",
ZodTypeAny,
{ roll: number },
{ roll: number },
>;
toolset: "View";
},
{
annotations: {
destructiveHint: false;
idempotentHint: false;
openWorldHint: false;
readOnlyHint: false;
title: "setCameraDistance";
};
description: "控制相机与当前目标视点之间的距离变化,实现相机画面的拉近或拉远";
name: "setCameraDistance";
schema: ZodObject<
{ mode: ZodEnum<["near", "far"]> },
"strip",
ZodTypeAny,
{ mode: "far" | "near" },
{ mode: "far" | "near" },
>;
toolset: "View";
},
] = ...
runtime 不写,直接同步 bridge 的 TOOL_SCHEMAS schemas 目录 除了 zod 定义之外,不应该有任何业务代码,不可引入任何外部模块,只允许在本目录下相互引用