obsidian-mcp-server
Version:
MCP server for Obsidian vaults — read, write, search, and surgically edit notes, tags, and frontmatter via the Local REST API plugin. STDIO or Streamable HTTP.
32 lines • 1.81 kB
TypeScript
/**
* @fileoverview obsidian_list_commands — list Obsidian command-palette commands.
* Gated behind `OBSIDIAN_ENABLE_COMMANDS=true` alongside `obsidian_execute_command`.
* Optional `nameRegex` post-filters the upstream payload before returning, since
* vaults with Templater/Dataview/QuickAdd/Excalidraw routinely register 300+
* commands and the LLM-bound listing is otherwise mostly noise.
* @module mcp-server/tools/definitions/obsidian-list-commands.tool
*/
import { z } from '@cyanheads/mcp-ts-core';
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
export declare const obsidianListCommands: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
nameRegex: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
commands: z.ZodArray<z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
}, z.core.$strip>>;
appliedFilters: z.ZodOptional<z.ZodObject<{
nameRegex: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>, readonly [{
readonly reason: "regex_invalid";
readonly code: JsonRpcErrorCode.ValidationError;
readonly when: "The supplied `nameRegex` is not a valid ECMAScript regex.";
readonly recovery: "Use a valid ECMAScript regex (e.g. `^Templater`), or omit nameRegex to disable filtering.";
}, {
readonly reason: "regex_unsafe";
readonly code: JsonRpcErrorCode.ValidationError;
readonly when: "The supplied `nameRegex` is well-formed but exceeds the 256-character limit or contains nested quantifiers known to cause catastrophic backtracking.";
readonly recovery: "Avoid nested quantifiers like `(a+)+` or `(.*)*`. Use a simpler pattern (e.g. `^Templater`), or omit nameRegex to disable filtering.";
}], undefined>;
//# sourceMappingURL=obsidian-list-commands.tool.d.ts.map