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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/search.ts:138-152 (handler)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'); } - src/server.ts:1126-1133 (schema)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, }, }, - src/server.ts:1264-1266 (registration)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; - src/server.ts:1126-1133 (registration)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, }, },