Files
shockbot/mcp/debug.ts
T
Colin McDonnell 53f6f18352 Fix debug logging
2025-12-17 10:44:49 -08:00

24 lines
692 B
TypeScript

import { type } from "arktype";
import type { Context } from "../main.ts";
import { $ } from "../utils/shell.ts";
import { execute, tool } from "./shared.ts";
export const DebugShellCommand = type({});
export function DebugShellCommandTool(_ctx: Context) {
return tool({
name: "debug_shell_command",
description:
"debug tool: runs 'git status' and returns the output. use this to test shell command execution in the MCP server.",
parameters: DebugShellCommand,
execute: execute(_ctx, async () => {
const result = $("git", ["status"]);
return {
success: true,
command: "git status",
output: result.trim(),
};
}),
});
}