Skip to main content
Glama
YanceyOfficial

Obsidian iCloud MCP

create_directory

Set up or verify directory structures for projects by creating new or nested directories in one operation. Ensures required paths exist silently within allowed directories on the Obsidian iCloud MCP server.

Instructions

Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently. Perfect for setting up directory structures for projects or ensuring required paths exist. Only works within allowed directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Implementation Reference

  • Implements the create_directory tool by parsing args with schema, creating directory with fs.mkdir (recursive), and returning success message.
    export async function createDirectory(args?: Record<string, unknown>) { const parsed = CreateDirectoryArgsSchema.safeParse(args) if (!parsed.success) { throw new Error(`Invalid arguments for create_directory: ${parsed.error}`) } await fs.mkdir(parsed.data.path, { recursive: true }) return { content: [ { type: 'text', text: `Successfully created directory ${parsed.data.path}` } ] } }
  • Zod schema defining input for create_directory: object with 'path' string.
    export const CreateDirectoryArgsSchema = z.object({ path: z.string() })
  • src/index.ts:130-134 (registration)
    Registers the 'create_directory' tool in ListToolsRequestHandler with name, prompt-based description, and schema.
    { name: 'create_directory', description: createDirectoryPrompt(), inputSchema: zodToJsonSchema(CreateDirectoryArgsSchema) as ToolInput },
  • src/index.ts:195-197 (registration)
    Dispatches calls to 'create_directory' tool by invoking the createDirectory handler function in CallToolRequestHandler.
    case 'create_directory': { return createDirectory(args) }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/YanceyOfficial/obsidian-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server