list_tenant_providers
Retrieve a comprehensive list of all providers associated with a specific tenant using the MCP server, enabling efficient management and oversight of tenant resources.
Instructions
List all providers for a tenant
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tenantId | Yes | The ID of the tenant |
Implementation Reference
- src/index.ts:260-272 (registration)Registration of the 'list_tenant_providers' MCP tool, including inline schema and handler function.server.tool( 'list_tenant_providers', 'List all providers for a tenant', { tenantId: UgSchema.TenantIdSchema, }, async ({ tenantId }) => { const providers = await usegrant.listTenantProviders(tenantId); return { content: [{ type: 'text', text: JSON.stringify(providers, null, 2) }], }; }, );
- src/index.ts:263-265 (schema)Input schema for the tool, defining 'tenantId' parameter validated by UgSchema.TenantIdSchema.{ tenantId: UgSchema.TenantIdSchema, },
- src/index.ts:266-271 (handler)The handler function that executes the tool logic: calls usegrant.listTenantProviders(tenantId) and formats the result as MCP content.async ({ tenantId }) => { const providers = await usegrant.listTenantProviders(tenantId); return { content: [{ type: 'text', text: JSON.stringify(providers, null, 2) }], }; },