get_tenant_provider_policy
Retrieve access policies for tenant providers by specifying tenant ID, provider ID, and policy ID. Facilitates managed access control in the UseGrant MCP Server platform.
Instructions
Get a policy for a tenant provider
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policyId | Yes | The ID of the tenant provider policy | |
| providerId | Yes | The ID of the tenant provider | |
| tenantId | Yes | The ID of the tenant |
Implementation Reference
- src/index.ts:358-363 (handler)Handler function that retrieves the tenant provider policy using the UseGrant SDK and returns it as JSON.async ({ tenantId, providerId, policyId }) => { const policy = await usegrant.getTenantProviderPolicy(tenantId, providerId, policyId); return { content: [{ type: 'text', text: JSON.stringify(policy, null, 2) }], }; },
- src/index.ts:353-357 (schema)Input schema for the tool, defining tenantId, providerId, and policyId using schemas from @usegrant/sdk/schema.{ tenantId: UgSchema.TenantIdSchema, providerId: UgSchema.TenantProviderIdSchema, policyId: UgSchema.TenantProviderPolicyIdSchema, },
- src/index.ts:350-364 (registration)Registration of the 'get_tenant_provider_policy' tool with the MCP server, including description, input schema, and handler.server.tool( 'get_tenant_provider_policy', 'Get a policy for a tenant provider', { tenantId: UgSchema.TenantIdSchema, providerId: UgSchema.TenantProviderIdSchema, policyId: UgSchema.TenantProviderPolicyIdSchema, }, async ({ tenantId, providerId, policyId }) => { const policy = await usegrant.getTenantProviderPolicy(tenantId, providerId, policyId); return { content: [{ type: 'text', text: JSON.stringify(policy, null, 2) }], }; }, );