fix: 审查修复 — import清理+capabilities匹配+placeholder加required
This commit is contained in:
@@ -44,8 +44,8 @@ export function createServer(opts: ServerOptions): McpServer {
|
|||||||
server.tool(
|
server.tool(
|
||||||
toolDef.name,
|
toolDef.name,
|
||||||
toolDef.description,
|
toolDef.description,
|
||||||
toolDef.inputSchema.properties,
|
{ ...toolDef.inputSchema.properties, _required: toolDef.inputSchema.required },
|
||||||
async () => ({
|
async (args: any) => {
|
||||||
content: [{ type: "text", text: JSON.stringify({ error: "Tool not yet implemented", tool: toolDef.name }) }],
|
content: [{ type: "text", text: JSON.stringify({ error: "Tool not yet implemented", tool: toolDef.name }) }],
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import { bootstrap, type ServerOptions } from "./index.js";
|
import { bootstrap, type ServerOptions } from "./index.js";
|
||||||
import * as tools from "./tools.js";
|
import * as tools from "./tools.js";
|
||||||
import type { DeviceConfig, GatewayConfig } from "@yuzu-gca/shared";
|
import type { DeviceConfig } from "@yuzu-gca/shared";
|
||||||
import * as os from "node:os";
|
import * as os from "node:os";
|
||||||
import { randomUUID } from "node:crypto";
|
import { randomUUID } from "node:crypto";
|
||||||
|
|
||||||
@@ -30,7 +30,6 @@ const config: DeviceConfig = {
|
|||||||
heartbeatInterval: 15000,
|
heartbeatInterval: 15000,
|
||||||
},
|
},
|
||||||
capabilities: [
|
capabilities: [
|
||||||
"device_info", "device_status",
|
|
||||||
"exec", "process_list",
|
"exec", "process_list",
|
||||||
"file_list", "file_read", "file_write", "file_move",
|
"file_list", "file_read", "file_write", "file_move",
|
||||||
"sysinfo",
|
"sysinfo",
|
||||||
|
|||||||
Reference in New Issue
Block a user