Skip to main content
Glama
Qwinty
by Qwinty

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
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool returns a list with IDs, names, and metadata, and that no parameters are required. However, it doesn't mention potential limitations like pagination, rate limits, or authentication requirements, which would be helpful for a list operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences with zero waste: it states the purpose, details the return value, and provides usage guidance. It's front-loaded with the core action and efficiently covers all necessary information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with no parameters and no output schema, the description is mostly complete. It explains what the tool does, what it returns, and when to use it. However, without annotations or an output schema, it could benefit from more detail on the return structure (e.g., format of 'other metadata') or behavioral constraints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage. The description explicitly states 'No parameters are required,' which adds clarity beyond the empty schema. This is appropriate for a parameterless tool, though it doesn't need to explain non-existent parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Retrieves'), resource ('Anytype spaces'), and scope ('for the current user'). It distinguishes this tool from siblings like 'get_space_members' or 'create_space' by focusing on listing all spaces rather than modifying or getting details of specific spaces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool ('to get an overview of all spaces or to find a specific space ID for use with other tools'). It implies an alternative use case compared to siblings like 'search_space' (which likely filters) or 'get_space_members' (which focuses on members of a specific space).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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