Skip to main content
Glama
usegranthq

UseGrant MCP Server

Official
by usegranthq

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
NameRequiredDescriptionDefault
tenantIdYesThe 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) }],
        };
      },
    );
  • Input schema for the tool, defining 'tenantId' parameter validated by UgSchema.TenantIdSchema.
    {
      tenantId: UgSchema.TenantIdSchema,
    },
  • 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) }],
      };
    },

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