Skip to main content
Glama

get_file_or_folder_details

Fetch detailed metadata for a specific file or folder using its unique URL from DAV MCP Server, aiding in managing CalDAV, CardDAV, and WebDAV services effectively.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileUrlYesThe unique identifier (URL) of the file or folder to get details for. You can get this from 'list_my_files_and_folders'.

Implementation Reference

  • The handler function that executes the tool logic: logs into the WebDAV client and fetches detailed properties for the specified file or folder URL using fetchObjects.
    async ({ fileUrl }) => { try { await webDavClient.login(); // fetchObjects can be used with a full URL to an object to get its properties const objectProperties = await webDavClient.fetchObjects({ collection: fileUrl }); return { content: [{ type: "text", text: JSON.stringify(objectProperties, null, 2) }] }; } catch (error) { console.error(`Error in get_file_or_folder_details_from_${DAV_PROVIDER}:`, error); return { content: [{ type: "text", text: `Error getting WebDAV file metadata: ${JSON.stringify(error.message || error)}` }], isError: true }; } }
  • Input schema defining the required 'fileUrl' parameter as a string with description.
    inputSchema: { fileUrl: z.string().describe("The unique identifier (URL) of the file or folder to get details for. You can get this from 'list_my_files_and_folders'."), },
  • index.js:274-303 (registration)
    MCP server tool registration for 'get_file_or_folder_details_from_${DAV_PROVIDER}', including dynamic name based on DAV_PROVIDER, description, input schema, and handler reference. Conditionally registered only if webDavClient is available.
    `get_file_or_folder_details_from_${DAV_PROVIDER}`, { description: `Retrieves detailed properties for a specific file or folder from your ${DAV_PROVIDER} WebDAV storage. You must provide the full \`fileUrl\` of the item, which you can get from \`list_my_files_and_folders_from_${DAV_PROVIDER}\`. This is only available for providers that support WebDAV.`, inputSchema: { fileUrl: z.string().describe("The unique identifier (URL) of the file or folder to get details for. You can get this from 'list_my_files_and_folders'."), }, }, async ({ fileUrl }) => { try { await webDavClient.login(); // fetchObjects can be used with a full URL to an object to get its properties const objectProperties = await webDavClient.fetchObjects({ collection: fileUrl }); return { content: [{ type: "text", text: JSON.stringify(objectProperties, null, 2) }] }; } catch (error) { console.error(`Error in get_file_or_folder_details_from_${DAV_PROVIDER}:`, error); return { content: [{ type: "text", text: `Error getting WebDAV file metadata: ${JSON.stringify(error.message || error)}` }], isError: true }; } } );

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/jahfer/dav-mcp-server'

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