Skip to main content
Glama

get_copilot_seat_assignments

Retrieve GitHub Copilot seat assignments for an organization, showing user lists with last activity dates, editor information, and plan types.

Instructions

Get Copilot seat assignments for an Organization (user list with last activity date, editor info, plan type)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orgNoOrganization name (defaults to GITHUB_ORG env var)
force_refreshNoIgnore cache and fetch fresh data

Implementation Reference

  • The registration and handler implementation for the get_copilot_seat_assignments tool.
    export function registerSeatsTool(server: McpServer, client: GitHubClient, defaultOrg: string) {
      server.tool(
        "get_copilot_seat_assignments",
        "Get Copilot seat assignments for an Organization (user list with last activity date, editor info, plan type)",
        {
          org: z.string().optional().describe("Organization name (defaults to GITHUB_ORG env var)"),
          force_refresh: z.boolean().optional().describe("Ignore cache and fetch fresh data"),
        },
        async ({ org, force_refresh }) => {
          try {
            const o = org ?? defaultOrg;
            if (!o) {
              return { content: [{ type: "text", text: "Organization name is required. Set GITHUB_ORG or pass 'org' parameter." }], isError: true };
            }
    
            const seats = await client.fetchSeats(o, force_refresh ?? false);
    
            return { content: [{ type: "text", text: JSON.stringify(seats, null, 2) }] };
          } catch (error) {
            return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
          }
        }
      );
    }

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/tatsuyamiyazaki/copilot-usage-mcp'

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