Skip to main content
Glama
usegranthq

UseGrant MCP Server

Official
by usegranthq

get_domain

Retrieve domain details by specifying the provider ID and domain ID using the UseGrant MCP Server. Simplifies domain management for providers and tenants.

Instructions

Get a domain by provider and domain ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainIdYesThe ID of the domain
providerIdYesThe ID of the provider

Implementation Reference

  • src/index.ts:152-165 (registration)
    Registers the 'get_domain' MCP tool with server.tool, providing name, description, input schema, and an inline handler function.
    server.tool( 'get_domain', 'Get a domain by provider and domain ID', { providerId: UgSchema.ProviderIdSchema, domainId: UgSchema.DomainIdSchema, }, async ({ providerId, domainId }) => { const domain = await usegrant.getDomain(providerId, domainId); return { content: [{ type: 'text', text: JSON.stringify(domain, null, 2) }], }; }, );
  • The handler function for the get_domain tool. It takes providerId and domainId, retrieves the domain via the UseGrant SDK, stringifies it to JSON, and returns it in the MCP content format.
    async ({ providerId, domainId }) => { const domain = await usegrant.getDomain(providerId, domainId); return { content: [{ type: 'text', text: JSON.stringify(domain, null, 2) }], }; },
  • Input schema for the get_domain tool, defining providerId and domainId parameters using Zod schemas imported from '@usegrant/sdk/schema'.
    { providerId: UgSchema.ProviderIdSchema, domainId: UgSchema.DomainIdSchema, },

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

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