# get_component

**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`: the `id` from 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

```json
{
  "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](/docs/tools) (all tools on one page), [Error codes](/docs/errors), [Credits & plans](/docs/credits). Other tools: [`search_components`](/docs/tools/search-components), [`check_component_security`](/docs/tools/check-component-security), [`find_similar`](/docs/tools/find-similar), [`list_categories`](/docs/tools/list-categories), [`library_stats`](/docs/tools/library-stats), [`list_licenses`](/docs/tools/list-licenses), [`get_component_bundle`](/docs/tools/get-component-bundle), [`compose_starter`](/docs/tools/compose-starter), [`licence_report`](/docs/tools/licence-report).
