Indexer Tools
The ten tools of vue-codebase-mcp. Every answer comes from the in-memory index — nothing is compiled or resolved at request time, so a call costs milliseconds.
Tool descriptions and parameter tables on this page are copied verbatim from a real tools/list response; answers are copied from real calls against playground/ui-library (7 components, 2 composables, 3 utils, 10 documents, index mode full). Long answers are abridged — the elision is always shown as … inside the code block.
New to MCP itself? Start with What is MCP.
At a glance
| Tool | The question it answers | Required parameter |
|---|---|---|
get_project_overview | What kind of project is this and what is in the index? | — |
list_entities | Enumerate everything (optionally filtered) | — |
search | Find an entity by purpose, name, prop or event | query |
search_docs | Full-text search over markdown documentation | query |
get_entity_details | Exact API: props, events, slots, exposed, signature, state | name |
get_source | The source file — whole, one SFC section, or a window of lines | name or path |
get_usage_examples | How the entity is really used in this codebase | name |
get_dependencies | What it uses and who uses it — the blast radius of a change | name |
get_documentation | Markdown by entity, by URI, by level, or a single section | — |
get_knowledge_graph | The graph of relations: code, documents, related, mentions | entity |
The order the overview itself suggests to the model:
get_project_overview → search → get_entity_details → get_documentation / get_source → get_usage_examplesHow to read an answer
api: <source>says where the API came from —vue-component-metaandtypescriptmean types were resolved;sfc-liteandsyntaxmean syntactic parsing only, and the answer says so explicitly with the command that fixes it.stalemarks a file edited after the snapshot was built.- Failures are diagnostics:
[code] messageplus, when there is something to suggest, a hint in a separate paragraph. Codes are stable (tools.entityNotFound,tools.unknownProject,tools.indexEmpty,tools.needNameOrPath,tools.pathOutsideRoots,tools.pathResolveFailed,tools.extensionNotAllowed,tools.deniedPath,tools.sourceDisabled,tools.sourceMissing,tools.docNotFound,tools.docsFilterEmpty). - Argument validation happens in the MCP SDK, before the handler runs. A wrong enum value or a missing required parameter produces
Input validation error: Invalid arguments for tool …— in English and without atools.*code. Everything the server controls itself carries a code. - Parameter descriptions in the tables below are copied from
tools/list. Every parameter has one, includingkindandproject, which mean the same thing in every tool:kindnarrows the entity kind,projectnarrows the workspace.
get_project_overview
Summary of the Vue project: index composition by entity kind, roots and tsconfig of every workspace, component categories, documentation counts and configuration warnings. Call it first to understand the project layout before searching.
No parameters.
{ "name": "get_project_overview", "arguments": {} }# Project overview · vue-codebase-mcp v0.1.0
Configuration: `<repo>/playground/ui-library/.vue-codebase-mcp.json`
Index: mode full, built 2026-11-20T17:12:45.270Z in 468 ms (snapshot from 2026-11-20T17:12:45.270Z)
## Projects
- **ui-library** — 7 components, 2 composables, 0 stores, 0 routes, 3 utils
root: `<repo>/playground/ui-library`
tsconfig: `<repo>/playground/ui-library/tsconfig.json`
## Index composition
- components: 7
- composables: 2
- stores: 0
- routes: 0
- utils: 3
- documents: 10 (component: 7, workspace: 2, project: 1)
## API sources
- vue-component-meta: 7
- typescript: 5
## Component categories · ui-library
- components: 7
## Suggested workflow
1. `search` — find an entity by purpose (understands both Russian and English);
2. `get_entity_details` — exact props/events/slots or a signature;
3. `get_documentation` — examples and explanations from markdown;
4. `get_source` — the source file, whole or a single section;
5. `get_usage_examples` and `get_dependencies` — how the entity is used in the project.Look at api sources first: if it says sfc-lite or syntax, run index --mode full. The overview is the one answer that prints absolute paths (configuration file, workspace roots, tsconfig) — it is a tool answer, not the HTTP API. On an empty index it does not fail: it reports zero counters, which is itself the diagnosis.
list_entities
Full or filtered list of project entities: components, composables, stores, routes, utils. Unlike
searchit does not rank by query, it just enumerates — convenient for a catalogue overview.
| Parameter | Type | Required | Limits | Description |
|---|---|---|---|---|
kind | string | no | component|composable|store|route|util | Filter by entity kind |
project | string | no | — | Filter by workspace (project name from the configuration) |
category | string | no | — | Filter by component category, e.g. components/forms |
includeInternal | boolean | no | — | Include internal entities (directories with _, marked @internal) |
limit | integer | no | 1–500 | Maximum number of entries, 200 by default |
{ "name": "list_entities", "arguments": { "kind": "component" } }# Project entities (7)
## component (7)
- **UiBadge** · component · `src/components/ui-badge/ui/UiBadge.vue` (stable)
Бейдж-статус: короткая цветная метка для списков и карточек.
- **UiButton** · component · `src/components/ui-button/ui/UiButton.vue` (stable)
Базовая кнопка дизайн-системы: варианты, размеры, состояние загрузки.
- **UiCard** · component · `src/components/ui-card/ui/UiCard.vue` (stable)
Карточка-контейнер с заголовком, содержимым и подвалом.
…Without filters the same call lists all 12 entities grouped by kind. Internal entities (the demo project has src/components/_internal/ui/UiIcon.vue) are excluded unless includeInternal: true — this follows components.ignoreInternal, which defaults to true.
Fails with [tools.unknownProject] (the answer lists the projects that do exist) and [tools.indexEmpty] (with the hint to check components.locations and the command to rebuild).
search
Searches components, composables, stores, routes and utils by name, purpose, props, events and tags. Understands Russian queries ("кнопка", "выпадающий список", "валидация формы") through a synonym dictionary, and accepts names in any form (UiButton, ui-button, button). Returns a summary with the match reason — request the full API via
get_entity_details.
| Parameter | Type | Required | Limits | Description |
|---|---|---|---|---|
query | string | yes | — | Query: the purpose of an entity, its name, or the name of a prop/event |
kinds | array | no | items: component|composable|store|route|util | Restrict the search to these entity kinds |
project | string | no | — | Restrict the search to a workspace (project name from the configuration) |
limit | integer | no | 1–100 | Maximum number of results, 10 by default |
includeInternal | boolean | no | — | Include internal entities (excluded by default) |
fullText | boolean | no | — | Also search descriptions through the full-text index right away |
{ "name": "search", "arguments": { "query": "button" } }## Index matches (1)
- **UiButton** · component · `src/components/ui-button/ui/UiButton.vue` (stable)
Базовая кнопка дизайн-системы: варианты, размеры, состояние загрузки.
match: exact name, categoryThe last line is the reason for the match, up to four signals: exact name, alias prefix, dictionary concept, a token from the name or the API, category, tag, description, phrase in description, fuzzy similarity with its score. Selection is automatic, so the model always sees what a result hung on.
The built-in Russian↔English dictionary works without any configuration — {"query": "кнопка"} returns the same UiButton with match: synonym (name): "button", name: "button". Extend it with search.synonyms, switch it off with search.useDefaultSynonyms: false. Details: Language.
Search is fuzzy in both directions: a nonsense query is not guaranteed to return nothing — {"query": "zzz-такого-компонента-нет"} matched the toggleAttribute utility because the word «компонентов» appears in its description (match: description). An empty query passes validation and answers "nothing found".
search_docs
Searches the project markdown documentation: project pages, workspace docs, component documents and collections (ADR, guidelines). Returns the title, level, a snippet around the match and the document URI. Request the full text or a single section via
get_documentation.
| Parameter | Type | Required | Limits | Description |
|---|---|---|---|---|
query | string | yes | — | Search query |
level | string | no | project|workspace|component|collection | Restrict the documentation level |
project | string | no | — | Restrict to a workspace |
collection | string | no | — | Restrict to a collection (e.g. "ADR") |
tags | array | no | — | Require all listed frontmatter tags to be present |
limit | integer | no | 1–50 | Maximum number of results, 10 by default |
{ "name": "search_docs", "arguments": { "query": "установка" } }## Documentation for "установка" (1)
- **Начало работы** · workspace · `doc://workspace/ui-library/docs/getting-started`
Библиотека `ui-library` распространяется как ES-модуль. Импортируйте отдельные компоненты из публичного API:
file: `docs/getting-started.md`This is MiniSearch full-text: it matches tokens of the document text, not entity names. Asking for {"query": "button", "level": "component"} in the demo project returns nothing even though UiButton has a documentation page — the page is written in Russian and the word "button" never appears in it as a token. Search documents with words from the documents; for entity names use search.
On a miss the answer is not empty — it lists the documents that do exist (first 15), which is usually enough to reformulate:
No documentation found for "theming" (the index holds 10 documents).
Available documents (first 15):
- UiBadge · `doc://component/UiBadge`
- UiButton · `doc://component/UiButton`
…get_entity_details
Returns the full API of an entity: for a component — generics, props, events, slots, exposed; for a composable — the signature, parameters and the shape of the returned value; for a store — state, getters, actions; for a route — path, name, component and meta. Also returns links to related documentation.
| Parameter | Type | Required | Limits | Description |
|---|---|---|---|---|
name | string | yes | — | Entity name in any form: UiButton, ui-button, button, useCounter, cart |
kind | string | no | component|composable|store|route|util | Narrow down the entity kind |
project | string | no | — | Workspace, when the same name exists in several projects |
format | string | no | markdown|json | Response format, markdown by default |
{ "name": "get_entity_details", "arguments": { "name": "UiButton" } }## UiButton · component · ui-library
file: `src/components/ui-button/ui/UiButton.vue` · uri: `component://UiButton` · api: vue-component-meta · status: stable
Базовая кнопка дизайн-системы: варианты, размеры, состояние загрузки.
Category: components / ui-button / ui
### Props
- `variant` — `Variant` [default: `"primary"`] — Визуальный вариант оформления
- `size` — `Size` [default: `"m"`] — Размер кнопки
- `loading` — `boolean` [default: `false`] — Переводит кнопку в состояние «загрузка» и блокирует клики
- `disabled` — `boolean` [default: `false`] — Кнопка недоступна для взаимодействия
- `type` — `"button" | "submit" | "reset"` [default: `"button"`] — Тип нативной кнопки в форме
### Events
- `click` — `(event: MouseEvent): void`
### Slots
- `default` — Основное содержимое кнопки (текст)
- `icon` — Иконка перед текстом
### Documentation
- UiButton · `doc://component/UiButton` · file: `src/components/ui-button/docs/ui-button.md`
Request the full text or a single section via `get_documentation`.
### Mentioned in documentation
- Начало работы · `doc://workspace/ui-library/docs/getting-started`
- Темы и оформление · `doc://workspace/ui-library/docs/theming`
- ui-library — демо-проект `vue-codebase-mcp` · `doc://project/README`
Dependencies: uses 1, used in 0 — details via `get_dependencies`.Two sections distinguish strong links (Documentation — the page belongs to the component) from weak ones (Mentioned in documentation — the page merely mentions it). A typo returns suggestions ranked by Levenshtein distance:
[tools.entityNotFound] "UiButon" was not found in the index (12 entities).
Did you mean:
- UiButton · component · ui-library
- UiBadge · component · ui-library
Refine the request with the `search` tool.get_source
Returns the source of a file: for
.vue— the whole file or a single section (script/template/style), for.ts— the whole file or a window of lines. Long files are truncated with an explicit notice. The path is checked for escaping the project and for belonging to forbidden files (.env, keys, node_modules).
| Parameter | Type | Required | Limits | Description |
|---|---|---|---|---|
name | string | one of the two | — | Entity name — the source file is looked up through the index |
path | string | one of the two | — | Path to a file relative to the project root (instead of a name) |
kind | string | no | component|composable|store|route|util | Narrow down the entity kind |
project | string | no | — | Workspace, when the same name exists in several projects |
section | string | no | all|script|template|style | SFC section, taken from the configuration by default |
startLine | integer | no | ≥ 0 | First line of the window |
maxLines | integer | no | ≤ 5000 | Maximum number of lines, taken from the configuration by default |
{ "name": "get_source", "arguments": { "name": "UiButton", "section": "template" } }# UiButton · src/components/ui-button/ui/UiButton.vue
```vue
<template>
<button :class="classes" :disabled="isBlocked" :type="type" @click="onClick">
<span v-if="loading" class="ui-button__spinner" aria-hidden="true" />
<span v-else-if="$slots.icon" class="ui-button__icon"><slot name="icon" /></span>
<span class="ui-button__label"><slot /></span>
</button>
</template>
```Asking for a section instead of all is the cheapest way to read a large SFC. If the file has no such section, the answer says so instead of failing. A .vue file longer than tools.getSource.maxLines (1500 by default) comes back as its script section with an explicit notice — the script is the part worth reading when discussing an API; other files are cut to the limit.
The guards apply to the path form of the call:
| Situation | Diagnostic |
|---|---|
Neither name nor path | [tools.needNameOrPath] |
The path escapes the project root (.., a symlink) | [tools.pathOutsideRoots] |
| The path cannot be resolved | [tools.pathResolveFailed] |
A forbidden path — node_modules/, .env*, keys, .git/ | [tools.deniedPath] |
An extension outside resources.allowedFileExtensions | [tools.extensionNotAllowed] |
resources.exposeSourceCode: false | [tools.sourceDisabled] |
| The file is gone although the index knows it | [tools.sourceMissing] |
Real answers:
[tools.deniedPath] File `node_modules/vue/package.json` is not allowed to be exposed
[tools.extensionNotAllowed] Extension `.xyz` is not in the allowed list (.vue, .ts, .tsx, .js, .jsx, .mts, .mjs, .md, .mdx, .json, .css, .scss, .html, .yaml, .yml)
[tools.sourceDisabled] Source code exposure is disabled in the configuration (`resources.exposeSourceCode: false`)exposeSourceCode: false closes both branches of get_source
The gate is checked for a path and for a name: with exposure turned off, get_source { "name": "UiButton" } answers [tools.sourceDisabled] exactly like an arbitrary path does. The index still knows which file the entity lives in, so get_entity_details keeps returning the path, the API and the documentation links — only the source text is not served. See Deployment → Security.
get_usage_examples
Shows how an entity is really used in the codebase: file fragments with imports and template usage, with line numbers and context. Useful for repeating the pattern accepted in the project instead of inventing a new one. Additionally returns code examples from the related documentation.
| Parameter | Type | Required | Limits | Description |
|---|---|---|---|---|
name | string | yes | — | Entity name |
kind | string | no | component|composable|store|route|util | Narrow down the entity kind |
project | string | no | — | Workspace, when the same name exists in several projects |
limit | integer | no | 1–20 | How many examples to return, taken from the configuration by default |
contextLines | integer | no | 0–60 | Lines of context around the usage |
includeTests | boolean | no | — | Include tests and stories (excluded by default) |
fromDocs | boolean | no | — | Add code blocks from the entity documentation |
{ "name": "get_usage_examples", "arguments": { "name": "UiButton" } }# Usage examples of UiButton
No usages found in the project code.
## In the documentation (5)
### UiButton · Примеры · `doc://component/UiButton`
```vue
<script setup lang="ts">
import { UiButton } from "ui-library";
function save(): void {
console.log("saved");
}
</script>
<template>
<UiButton variant="primary" size="m" @click="save">Сохранить</UiButton>
<UiButton variant="ghost" :loading="true">Загрузка…</UiButton>
</template>
```
…In the demo library the components are not used by an application, so the code section is empty and only documentation examples remain — the answer says that plainly instead of inventing usages. Note that this tool does not fail when there is nothing to show.
get_dependencies
Shows which entities this one uses (imports, components in the template) and who uses it. Needed before refactoring: the blast radius and the files to check become visible.
| Parameter | Type | Required | Limits | Description |
|---|---|---|---|---|
name | string | yes | — | Entity name |
kind | string | no | component|composable|store|route|util | Narrow down the entity kind |
project | string | no | — | Workspace, when the same name exists in several projects |
depth | integer | no | 1–3 | Traversal depth, 1 by default |
{ "name": "get_dependencies", "arguments": { "name": "UiButton" } }# Dependencies of UiButton
## Uses (1)
- **cn** · util · `src/libs/cn.ts`
Склеивает CSS-классы, пропуская ложные значения и раскрывая условные объекты.
## Used by (0)
- not used anywhere
## Documentation (4)
- UiButton · `doc://component/UiButton`
- Начало работы · `doc://workspace/ui-library/docs/getting-started`
- Темы и оформление · `doc://workspace/ui-library/docs/theming`
- ui-library — демо-проект `vue-codebase-mcp` · `doc://project/README`Used by (0) is the answer for a leaf of a design system; in an application it is the list of screens that will break. Raise depth to 2–3 to see transitive links.
get_documentation
Returns markdown documentation: by entity (aggregates the component page and related documents), by document URI, by level (project / workspace / component / collection) or a single section by heading. A section saves context: only the needed part arrives instead of the whole page.
| Parameter | Type | Required | Limits | Description |
|---|---|---|---|---|
entity | string | one of three | — | Entity name — return the documentation linked to it |
uri | string | one of three | — | Document URI, e.g. doc://component/UiButton |
level | string | one of three | project|workspace|component|collection | Documentation level; without entity/uri returns the list of documents of that level |
collection | string | no | — | Collection name (ADR, guidelines) — a refinement for level |
project | string | no | — | Workspace |
section | string | no | — | Section heading (H2/H3) — return only that section |
includeContent | boolean | no | — | For a document list: return the text as well, not only the summary |
limit | integer | no | 1–20 | Maximum number of documents in the list, 10 by default |
{ "name": "get_documentation", "arguments": { "entity": "UiButton" } }# UiButton
level: component · file: `src/components/ui-button/docs/ui-button.md` · uri: `doc://component/UiButton`
status: stable
# UiButton
Базовая кнопка дизайн-системы. Поддерживает варианты оформления, размеры,
состояние загрузки и слот для иконки.
## Примеры
```vue
<script setup lang="ts">
import { UiButton } from "ui-library";
…
</script>
<template>
<UiButton variant="primary" size="m" @click="save">Сохранить</UiButton>
<UiButton variant="ghost" :loading="true">Загрузка…</UiButton>
</template>
```
## Props
…Called with no arguments at all it returns the document catalogue (10 entries in the demo project). A wrong entity gives [tools.entityNotFound], a wrong uri gives [tools.docNotFound], and a filter that excludes everything gives [tools.docsFilterEmpty]. Long answers are capped by tools.getDocumentation.maxChars (24000 by default).
get_knowledge_graph
Builds the graph of an entity's relations: which entities it uses, who uses it, which documents describe it and what they are linked to (frontmatter
related, mentions in the text). Thejsonformat is suitable for visualisation.
| Parameter | Type | Required | Limits | Description |
|---|---|---|---|---|
entity | string | yes | — | Entity name — the centre of the graph |
kind | string | no | component|composable|store|route|util | Narrow down the entity kind |
project | string | no | — | Workspace, when the same name exists in several projects |
depth | integer | no | 1–3 | Traversal depth over code, 1 by default |
includeDocs | boolean | no | — | Include documents and their relations (included by default) |
format | string | no | text|json | Response format, text by default |
{ "name": "get_knowledge_graph", "arguments": { "entity": "UiButton" } }# Knowledge graph: UiButton (depth 1)
## Nodes (14)
- [component] UiButton · `src/components/ui-button/ui/UiButton.vue`
- [util] cn · `src/libs/cn.ts`
- [doc] UiButton · `doc://component/UiButton` · `src/components/ui-button/docs/ui-button.md`
- [component] UiBadge · `src/components/ui-badge/ui/UiBadge.vue`
…
## Edges (25)
- UiButton —uses→ cn
- UiButton —documentedIn→ UiButton
- UiButton —related→ UiBadge
- UiButton —mentions→ Начало работы
…Edge kinds: uses / usedBy (code), documentedIn (a strong link), mentions (a weak link), related (frontmatter). format: "json" returns the same graph as { nodes, edges } — that is what the preview interface draws in graph mode.
Resources: the same data by URI
Everything above is also addressable as a resource — component://UiButton, doc://component/UiButton, file://src/components/ui-button/ui/UiButton.vue, index://overview. Clients that prefer reading documents to calling tools use them instead: Resources.
Next
- View server tools — the four
preview_*tools - Recipes — the same tools assembled into answers to real questions
- Configuration — what changes the answers: locations, prefixes, limits, exposure