Skip to main content
Glama
piyushgIITian

GitHub Enterprise MCP Server

get-license-info

Retrieve details about commonly used GitHub licenses to understand license terms and compliance requirements for software projects.

Instructions

Get information about commonly used licenses on GitHub

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that retrieves information about all commonly used licenses from the GitHub API using Octokit.
    export async function getLicenseInfo(): Promise<any> { const github = getGitHubApi(); return tryCatchAsync(async () => { const { data } = await github.getOctokit().licenses.getAllCommonlyUsed(); return data.map((license) => ({ key: license.key, name: license.name, spdx_id: license.spdx_id, url: license.url, node_id: license.node_id, })); }, 'Failed to get license information'); }
  • The input schema definition for the tool (empty object since no parameters are required).
    name: 'get-license-info', description: 'Get information about commonly used licenses on GitHub', inputSchema: { type: 'object', properties: {}, additionalProperties: false, }, },
  • The dispatch case in the CallToolRequest handler that routes 'get-license-info' calls to the getLicenseInfo function.
    case 'get-license-info': result = await getLicenseInfo(); break;
  • The tool object in the ListTools response that registers the tool's metadata with the MCP server.
    name: 'get-license-info', description: 'Get information about commonly used licenses on GitHub', inputSchema: { type: 'object', properties: {}, additionalProperties: false, }, },

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/piyushgIITian/github-enterprice-mcp'

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