export_object
Export Anytype objects to Markdown format for backup or use in external applications. Extract content for sharing or documentation purposes.
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
| Name | Required | Description | Default |
|---|---|---|---|
| space_id | Yes | Space ID containing the object | |
| object_id | Yes | Object ID to export | |
| format | Yes | Export format (currently only 'markdown' is supported) |
Implementation Reference
- src/index.ts:307-334 (registration)Registration of the 'export_object' tool on the MCP server, including inline schema and handler function."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); } } );
- src/index.ts:316-333 (handler)The handler function for 'export_object' tool. It makes a GET request to the Anytype API endpoint `/spaces/{space_id}/objects/{object_id}/{format}` (markdown) and returns the response as JSON text content.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); } }
- src/index.ts:309-315 (schema)Zod input schema for the 'export_object' tool, 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)"), },