Skip to main content
Glama

export_object

Export Anytype objects to Markdown format for external use or backup. Extract content to share with other applications or create portable documentation files.

Instructions

Exports an Anytype object in Markdown format. This tool allows you to extract content from Anytype for use in other applications or for backup purposes. Markdown format is human-readable and suitable for documentation. Use this tool when you need to share Anytype content with external systems or create portable backups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesSpace ID containing the object
object_idYesObject ID to export
formatYesExport format (currently only 'markdown' is supported)

Implementation Reference

  • The handler function that executes the tool logic: makes a GET request to the Anytype API to export the specified object in markdown format and returns the JSON response or error.
    async ({ space_id, object_id, format }) => { try { const response = await this.makeRequest( "get", `/spaces/${space_id}/objects/${object_id}/${format}` ); return { content: [ { type: "text" as const, text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleApiError(error); } }
  • Zod input schema defining required parameters: space_id, object_id, and format (fixed to 'markdown').
    { space_id: z.string().describe("Space ID containing the object"), object_id: z.string().describe("Object ID to export"), format: z .literal("markdown") .describe("Export format (currently only 'markdown' is supported)"), },
  • src/index.ts:306-334 (registration)
    Tool registration call using McpServer.tool() method, specifying name, description, schema, and handler.
    this.server.tool( "export_object", "Exports an Anytype object in Markdown format. This tool allows you to extract content from Anytype for use in other applications or for backup purposes. Markdown format is human-readable and suitable for documentation. Use this tool when you need to share Anytype content with external systems or create portable backups.", { space_id: z.string().describe("Space ID containing the object"), object_id: z.string().describe("Object ID to export"), format: z .literal("markdown") .describe("Export format (currently only 'markdown' is supported)"), }, async ({ space_id, object_id, format }) => { try { const response = await this.makeRequest( "get", `/spaces/${space_id}/objects/${object_id}/${format}` ); return { content: [ { type: "text" as const, text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleApiError(error); } } );

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/Qwinty/anytype-mcp'

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