list_domains
Retrieve all domains associated with a provider using the specified provider ID to manage and organize domain data on the UseGrant MCP Server.
Instructions
List all domains for a provider
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| providerId | Yes | The ID of the provider |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"providerId": {
"description": "The ID of the provider",
"minLength": 1,
"type": "string"
}
},
"required": [
"providerId"
],
"type": "object"
}
Implementation Reference
- src/index.ts:129-134 (handler)Handler function for the 'list_domains' tool. It takes a providerId, calls usegrant.listDomains(providerId), and returns the JSON stringified domains in the tool response format.async ({ providerId }) => { const domains = await usegrant.listDomains(providerId); return { content: [{ type: 'text', text: JSON.stringify(domains, null, 2) }], }; },
- src/index.ts:126-128 (schema)Input schema for the 'list_domains' tool, specifying that providerId must conform to UgSchema.ProviderIdSchema (likely a Zod schema).{ providerId: UgSchema.ProviderIdSchema, },
- src/index.ts:123-135 (registration)Registration of the 'list_domains' MCP tool using server.tool(), including name, description, input schema, and handler function.server.tool( 'list_domains', 'List all domains for a provider', { providerId: UgSchema.ProviderIdSchema, }, async ({ providerId }) => { const domains = await usegrant.listDomains(providerId); return { content: [{ type: 'text', text: JSON.stringify(domains, null, 2) }], }; }, );