Skip to main content
Glama

terros_get_current_user

Retrieve the authenticated user's profile from Terros to access account details and manage user information.

Instructions

Get the authenticated user's own profile from Terros.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tool registration and handler for 'terros_get_current_user'. This is where the tool is registered with the MCP server and the async handler that executes when called, which returns the current user's profile via client.getCurrentUser().
    server.tool(
      "terros_get_current_user",
      "Get the authenticated user's own profile from Terros.",
      {},
      async () => {
        try {
          return { content: [{ type: "text", text: toJsonText(await client.getCurrentUser()) }] };
        } catch (error) {
          return { content: [{ type: "text", text: toErrorText(error) }], isError: true };
        }
      }
    );
  • The getCurrentUser method in TerrosApiClient that makes the actual API call. It sends a POST request to '/user/get' with an empty body to retrieve the authenticated user's profile.
    async getCurrentUser(): Promise<unknown> {
      return this.post("/user/get", {});
    }
  • The HTTP POST method that handles all API requests including the getCurrentUser call. It sets up the authorization header, makes the fetch request, and handles errors.
    private async post(path: string, body: unknown): Promise<unknown> {
      const url = `${this.baseUrl}${path}`;
    
      const response = await fetch(url, {
        method: "POST",
        headers: {
          Authorization: `ApiKey ${this.apiKey}`,
          "Content-Type": "application/json",
          Accept: "application/json",
        },
        body: JSON.stringify(body),
      });
    
      const contentType = response.headers.get("content-type") ?? "";
      const isJson = contentType.includes("application/json");
      const payload = isJson ? await response.json() : await response.text();
    
      if (!response.ok) {
        const p = payload as Record<string, unknown> | undefined;
        const detail =
          (typeof p?.message === "string" ? p.message : undefined) ??
          (typeof payload === "string" ? payload : undefined) ??
          response.statusText;
        throw new Error(`Terros API ${response.status}: ${detail}`);
      }
    
      return payload;
    }
  • The TerrosUser interface that defines the structure of user data returned by the getCurrentUser API call, including id, email, firstName, lastName, and role fields.
    export interface TerrosUser {
      id: string;
      email?: string;
      firstName?: string;
      lastName?: string;
      role?: string;
      [key: string]: unknown;
    }
  • src/server.ts:24-24 (registration)
    Where registerUserTools is called to register all user-related tools including terros_get_current_user when creating the MCP server.
    registerUserTools(server, client);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'authenticated user' implying authentication is needed, but doesn't specify required permissions, rate limits, error handling, or response format. This leaves significant gaps for a tool that likely involves user data access.

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, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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

Completeness2/5

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

Given the tool's complexity (accessing user profile data), lack of annotations, and no output schema, the description is insufficient. It doesn't explain what the profile includes, how authentication works, or potential errors, leaving the agent with incomplete information for reliable use.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, and the baseline score of 4 reflects that it doesn't need to compensate for any schema gaps.

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

Purpose4/5

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

The description clearly states the verb ('Get') and resource ('authenticated user's own profile from Terros'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'terros_get_user' which might fetch other users' profiles, leaving room for potential confusion.

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?

The description provides no guidance on when to use this tool versus alternatives such as 'terros_get_user' for other users or 'terros_get_company' for company data. It lacks explicit context, prerequisites, or exclusions, offering minimal usage direction.

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/terros-inc/mcp'

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