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
| Name | Required | Description | Default |
|---|---|---|---|
| domainId | Yes | The ID of the domain | |
| providerId | Yes | The 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) }], }; }, );
- src/index.ts:159-164 (handler)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) }], }; },
- src/index.ts:155-158 (schema)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, },