Skip to main content
Glama

get_spaces

Retrieve all available Anytype spaces for the current user to get space IDs, names, and metadata for use with other tools.

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

  • src/index.ts:33-51 (registration)
    Registration of the 'get_spaces' MCP tool, including name, description, empty input schema, and inline handler function.
    "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); } } );
  • The handler function for 'get_spaces' tool. Makes a GET request to the Anytype API /spaces endpoint using the private makeRequest method and returns the response data as formatted JSON text content. Handles errors by calling handleApiError.
    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); } }
  • Empty Zod schema for input parameters, indicating that the 'get_spaces' tool requires no input parameters.
    {}, // Empty params schema

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