Skip to main content
Glama

Get Workspace

get_workspace

Retrieve details of a specific workspace by providing its workspace ID.

Instructions

Get details of a specific workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWorkspace ID

Implementation Reference

  • The handler function that executes the 'get_workspace' tool logic. It sends a GraphQL query to fetch workspace details (id, public, enableAi, createdAt, permissions) and returns the result.
    const getWorkspaceHandler = async ({ id }: { id: string }) => {
      try {
        const query = `query GetWorkspace($id: String!) { 
          workspace(id: $id) { 
            id 
            public 
            enableAi 
            createdAt
            permissions { 
              Workspace_Read 
              Workspace_CreateDoc 
            } 
          } 
        }`;
        const data = await gql.request<{ workspace: any }>(query, { id });
        return text(data.workspace);
      } catch (error: any) {
        return text({ error: error.message });
      }
    };
  • Registers the 'get_workspace' tool on the MCP server with title 'Get Workspace', description, input schema (id: string), and the handler function.
    server.registerTool(
      "get_workspace",
      {
        title: "Get Workspace",
        description: "Get details of a specific workspace",
        inputSchema: { 
          id: z.string().describe("Workspace ID") 
        }
      },
      getWorkspaceHandler as any
    );
  • The input schema for the 'get_workspace' tool: expects an 'id' parameter (string, described as 'Workspace ID') validated via Zod.
    inputSchema: { 
      id: z.string().describe("Workspace ID") 
    }
  • Declares 'get_workspace' in the ALL_TOOLS constant array, making it a known tool name in the system.
    "get_workspace",
  • Maps 'get_workspace' to its permission groups ['workspaces', 'workspaces.read', 'read'] in the TOOL_GROUPS configuration.
    get_workspace: ["workspaces", "workspaces.read", "read"],
Behavior2/5

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

No annotations exist, so the description carries the full burden. It says 'Get details' but does not explain what details are returned, whether it's read-only, or any side effects. Minimal disclosure.

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 a single, front-loaded sentence with no unnecessary words. It earns its place without fluff.

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

Completeness3/5

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

For a simple get tool with one parameter and no output schema, the description is adequate but lacks specifics about return value. It minimally covers the tool's function.

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

Parameters3/5

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

The only parameter 'id' has a schema description 'Workspace ID', and the tool description adds no further meaning. With 100% schema coverage, a baseline of 3 is appropriate.

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 'Get details of a specific workspace' with a specific verb and resource. It distinguishes from siblings like list_workspaces (listing) and update_workspace (modification).

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like list_workspaces or get_doc. There are no explicit when-not or context statements.

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/DAWNCR0W/affine-mcp-server'

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