Skip to main content
Glama
usegranthq

UseGrant MCP Server

Official
by usegranthq

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
NameRequiredDescriptionDefault
providerIdYesThe ID of the tenant provider
tenantIdYesThe ID of the tenant

Implementation Reference

  • 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) }],
      };
    },
  • 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) }],
        };
      },
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/usegranthq/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server