001-obsidian-mcp-bundle #1
@@ -42,10 +42,14 @@ export class ObsidianMCPServer {
|
|||||||
*/
|
*/
|
||||||
registerTool(
|
registerTool(
|
||||||
name: string,
|
name: string,
|
||||||
_description: string,
|
description: string,
|
||||||
_inputSchema: Record<string, unknown>,
|
inputSchema: Record<string, unknown>,
|
||||||
handler: ToolHandler
|
handler: ToolHandler
|
||||||
): void {
|
): void {
|
||||||
|
// Ensure handler has description and inputSchema
|
||||||
|
handler.description = description;
|
||||||
|
handler.inputSchema = inputSchema;
|
||||||
|
|
||||||
this.tools.set(name, handler);
|
this.tools.set(name, handler);
|
||||||
logger.debug('Registered tool', { name });
|
logger.debug('Registered tool', { name });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export async function registerSearchTools(server: ObsidianMCPServer): Promise<vo
|
|||||||
// T046: Search tool
|
// T046: Search tool
|
||||||
server.registerTool(
|
server.registerTool(
|
||||||
'obsidian_search',
|
'obsidian_search',
|
||||||
'Search vault for text. Returns matching files and optionally match counts. Supports path filtering, result limits, case sensitivity, and multiple output formats (text/json).',
|
'Search vault for text. Returns matching files or optionally match counts using `total` flag. Supports path filtering, result limits, case sensitivity, and multiple output formats (text/json).',
|
||||||
{ type: 'object', properties: {} },
|
{ type: 'object', properties: {} },
|
||||||
createToolHandler(
|
createToolHandler(
|
||||||
'Search vault for text',
|
'Search vault for text',
|
||||||
|
|||||||
Reference in New Issue
Block a user