list_tenant_provider_policies
Retrieve all policies associated with a tenant provider by specifying tenant and provider IDs. Access policy details efficiently for management and oversight.
Instructions
List all policies for a tenant provider
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| providerId | Yes | The ID of the tenant provider | |
| tenantId | Yes | The ID of the tenant |
Implementation Reference
- src/index.ts:326-331 (handler)Handler function that executes the tool logic by calling usegrant.listTenantProviderPolicies and returning the policies as JSON.async ({ tenantId, providerId }) => { const policies = await usegrant.listTenantProviderPolicies(tenantId, providerId); return { content: [{ type: 'text', text: JSON.stringify(policies, null, 2) }], }; },
- src/index.ts:322-325 (schema)Input schema for the tool, defining tenantId and providerId using Zod schemas from UseGrant SDK.{ tenantId: UgSchema.TenantIdSchema, providerId: UgSchema.TenantProviderIdSchema, },
- src/index.ts:319-332 (registration)Registration of the 'list_tenant_provider_policies' tool with the MCP server, including name, description, schema, and handler.server.tool( 'list_tenant_provider_policies', 'List all policies for a tenant provider', { tenantId: UgSchema.TenantIdSchema, providerId: UgSchema.TenantProviderIdSchema, }, async ({ tenantId, providerId }) => { const policies = await usegrant.listTenantProviderPolicies(tenantId, providerId); return { content: [{ type: 'text', text: JSON.stringify(policies, null, 2) }], }; }, );