Skip to main content
Glama
getmasv

masv

Official

get_portal

Retrieve a specific portal by ID to access its configuration, recipients, connected integrations, and settings.

Instructions

Get a specific portal by ID. Returns detailed information about the portal including its configuration, recipients, connected integrations, and settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portalIdYesId of the portal to retrieve

Implementation Reference

  • src/index.ts:334-350 (registration)
    MCP tool registration for 'get_portal' - registers the tool with description, input schema, and a handler that calls getPortal()
    server.registerTool(
      "get_portal",
      {
        description:
          "Get a specific portal by ID. Returns detailed information about the portal including its configuration, recipients, connected integrations, and settings.",
        inputSchema: GetPortalSchema.shape,
      },
      async (args) => {
        try {
          const data = await getPortal(args);
    
          return mcpOk(data);
        } catch (error) {
          return mcpError(error);
        }
      },
    );
  • Handler function that executes the tool logic - fetches portal details from the MASV API using the portalId
    async function getPortal({ portalId }: GetPortalParams) {
        const url = new URL(`${MASV_BASE_URL}/v1.1/portals/${portalId}`);
    
        const headers = {
            "content-type": "application/json",
            "x-api-key": MASV_API_KEY,
        };
    
        const r = await fetch(url.toString(), { headers });
        const data = await r.json();
    
        return data;
    }
  • Zod schema defining the input for get_portal - requires a portalId string parameter
    const GetPortalSchema = z.object({
        portalId: z.string().describe("Id of the portal to retrieve"),
    });
  • Environment variables used by getPortal - MASV_BASE_URL for the API endpoint, MASV_API_KEY for authentication
    export const MASV_BASE_URL = process.env.MASV_BASE_URL || "https://api.massive.app";
    export const MASV_TEAM_ID = process.env.MASV_TEAM_ID;
    export const MASV_API_KEY = process.env.MASV_API_KEY;
    export const MASV_ALLOW_DELETE = process.env.MASV_ALLOW_DELETE === "true";
  • Helper functions used by get_portal handler - mcpOk formats successful responses, mcpError formats error responses
    export function mcpOk(data: object | string) {
      return {
        content: [
          {
            type: "text" as const,
            text: typeof data === "string" ? data : JSON.stringify(data, null, 2),
          },
        ],
      };
    }
    
    export function mcpError(data: unknown) {
      const message = data instanceof Error ? data.message : String(data);
    
      return {
        isError: true,
        content: [{ type: "text" as const, text: message }],
      };
    }
Behavior3/5

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

Without annotations, the description carries full burden. It describes return content but does not explicitly state that this is a read-only operation with no side effects.

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?

Two sentences: the first states the action, the second lists return contents. No unnecessary words; efficient and front-loaded.

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 get-by-ID operation with one parameter and no output schema, the description covers the key return fields adequately, though it omits error handling or data format details.

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 sole parameter 'portalId' is fully described in the schema (100% coverage), and the description adds no additional meaning beyond the schema.

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 a specific portal by ID' and lists what information is returned, effectively distinguishing it from sibling tools like get_portals or update_portal.

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

Usage Guidelines4/5

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

The description implies usage context for retrieving a single portal's details, but it does not explicitly contrast with siblings or state when not to use it.

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/getmasv/masv-mcp-server'

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