Skip to main content
Glama

get_spaces

Retrieve all available Anytype spaces for the current user, including space IDs, names, and metadata to manage and access your workspaces.

Instructions

Retrieves all available Anytype spaces for the current user. This tool returns a list of spaces with their IDs, names, and other metadata. Use this tool to get an overview of all spaces or to find a specific space ID for use with other tools. No parameters are required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that executes the core logic of the 'get_spaces' tool by making a GET request to the Anytype API '/spaces' endpoint and returning the formatted JSON response. Handles errors using the shared handleApiError method.
    async (_) => { try { const response = await this.makeRequest("get", "/spaces"); return { content: [ { type: "text" as const, text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleApiError(error); } }
  • Input schema for the 'get_spaces' tool, defined as an empty object since the tool requires no parameters.
    {}, // Empty params schema
  • src/index.ts:32-51 (registration)
    Registration of the 'get_spaces' tool on the MCP server instance, specifying the tool name, description, input schema, and handler function.
    this.server.tool( "get_spaces", "Retrieves all available Anytype spaces for the current user. This tool returns a list of spaces with their IDs, names, and other metadata. Use this tool to get an overview of all spaces or to find a specific space ID for use with other tools. No parameters are required.", {}, // Empty params schema async (_) => { try { const response = await this.makeRequest("get", "/spaces"); 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