Jump to section
Credits: 1 per call. Plan: All plans.
Pulls one component: its full source, GitHub permalink, licence, dependencies and an attribution block. The returned source starts with an attribution header comment; keep it with the code. This is the call that spends a credit.
Parameters
| parameter | type | required | default |
|---|---|---|---|
id | string | yes |
id: theidfrom a search result.
Every call costs 1 credit, including a re-pull of a component you already fetched (a re-pull does not count twice against your plan's yearly fair-use cap) and a call with an id that is not in the public library, so use ids from search results. A pull refused by the fair-use cap is refunded.
Example call
{
"name": "get_component",
"arguments": { "id": "<id from search_components>" }
}
What it returns
id, name, description, repo, repo_url, source_url, language, function_tags, tech_stack (includes the file path), dependencies, license, license_kind, attribution and source_code (starting with the attribution header), plus security_advisories when present. Scores are on the search result, not here. For weak-copyleft files the header also says that modifications to that file stay under its licence. Errors: not available (unknown or not in the public library), pull_ceiling_exceeded (yearly fair-use cap; more credits do not lift it).
See also
Tool reference (all tools on one page), Error codes, Credits & plans. Other tools: search_components, check_component_security, find_similar, list_categories, library_stats, list_licenses, get_component_bundle, compose_starter, licence_report.
Put the guidance into practice.
Explore components with visible source, scores and licence metadata.