Skip to content

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 ​

ToolThe question it answersRequired parameter
get_project_overviewWhat kind of project is this and what is in the index?—
list_entitiesEnumerate everything (optionally filtered)—
searchFind an entity by purpose, name, prop or eventquery
search_docsFull-text search over markdown documentationquery
get_entity_detailsExact API: props, events, slots, exposed, signature, statename
get_sourceThe source file — whole, one SFC section, or a window of linesname or path
get_usage_examplesHow the entity is really used in this codebasename
get_dependenciesWhat it uses and who uses it — the blast radius of a changename
get_documentationMarkdown by entity, by URI, by level, or a single section—
get_knowledge_graphThe graph of relations: code, documents, related, mentionsentity

The order the overview itself suggests to the model:

text
get_project_overview → search → get_entity_details → get_documentation / get_source → get_usage_examples

How to read an answer ​

  • api: <source> says where the API came from — vue-component-meta and typescript mean types were resolved; sfc-lite and syntax mean syntactic parsing only, and the answer says so explicitly with the command that fixes it.
  • stale marks a file edited after the snapshot was built.
  • Failures are diagnostics: [code] message plus, 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 a tools.* code. Everything the server controls itself carries a code.
  • Parameter descriptions in the tables below are copied from tools/list. Every parameter has one, including kind and project, which mean the same thing in every tool: kind narrows the entity kind, project narrows 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.

json
{ "name": "get_project_overview", "arguments": {} }
text
# 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 search it does not rank by query, it just enumerates — convenient for a catalogue overview.

ParameterTypeRequiredLimitsDescription
kindstringnocomponent|composable|store|route|utilFilter by entity kind
projectstringno—Filter by workspace (project name from the configuration)
categorystringno—Filter by component category, e.g. components/forms
includeInternalbooleanno—Include internal entities (directories with _, marked @internal)
limitintegerno1–500Maximum number of entries, 200 by default
json
{ "name": "list_entities", "arguments": { "kind": "component" } }
text
# 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).

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.

ParameterTypeRequiredLimitsDescription
querystringyes—Query: the purpose of an entity, its name, or the name of a prop/event
kindsarraynoitems: component|composable|store|route|utilRestrict the search to these entity kinds
projectstringno—Restrict the search to a workspace (project name from the configuration)
limitintegerno1–100Maximum number of results, 10 by default
includeInternalbooleanno—Include internal entities (excluded by default)
fullTextbooleanno—Also search descriptions through the full-text index right away
json
{ "name": "search", "arguments": { "query": "button" } }
text
## Index matches (1)
- **UiButton** · component · `src/components/ui-button/ui/UiButton.vue` (stable)
  Базовая кнопка дизайн-системы: варианты, размеры, состояние загрузки.
  match: exact name, category

The 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.

ParameterTypeRequiredLimitsDescription
querystringyes—Search query
levelstringnoproject|workspace|component|collectionRestrict the documentation level
projectstringno—Restrict to a workspace
collectionstringno—Restrict to a collection (e.g. "ADR")
tagsarrayno—Require all listed frontmatter tags to be present
limitintegerno1–50Maximum number of results, 10 by default
json
{ "name": "search_docs", "arguments": { "query": "установка" } }
text
## 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:

text
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.

ParameterTypeRequiredLimitsDescription
namestringyes—Entity name in any form: UiButton, ui-button, button, useCounter, cart
kindstringnocomponent|composable|store|route|utilNarrow down the entity kind
projectstringno—Workspace, when the same name exists in several projects
formatstringnomarkdown|jsonResponse format, markdown by default
json
{ "name": "get_entity_details", "arguments": { "name": "UiButton" } }
text
## 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:

text
[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).

ParameterTypeRequiredLimitsDescription
namestringone of the two—Entity name — the source file is looked up through the index
pathstringone of the two—Path to a file relative to the project root (instead of a name)
kindstringnocomponent|composable|store|route|utilNarrow down the entity kind
projectstringno—Workspace, when the same name exists in several projects
sectionstringnoall|script|template|styleSFC section, taken from the configuration by default
startLineintegerno≥ 0First line of the window
maxLinesintegerno≤ 5000Maximum number of lines, taken from the configuration by default
json
{ "name": "get_source", "arguments": { "name": "UiButton", "section": "template" } }
text
# 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:

SituationDiagnostic
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:

text
[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.

ParameterTypeRequiredLimitsDescription
namestringyes—Entity name
kindstringnocomponent|composable|store|route|utilNarrow down the entity kind
projectstringno—Workspace, when the same name exists in several projects
limitintegerno1–20How many examples to return, taken from the configuration by default
contextLinesintegerno0–60Lines of context around the usage
includeTestsbooleanno—Include tests and stories (excluded by default)
fromDocsbooleanno—Add code blocks from the entity documentation
json
{ "name": "get_usage_examples", "arguments": { "name": "UiButton" } }
text
# 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.

ParameterTypeRequiredLimitsDescription
namestringyes—Entity name
kindstringnocomponent|composable|store|route|utilNarrow down the entity kind
projectstringno—Workspace, when the same name exists in several projects
depthintegerno1–3Traversal depth, 1 by default
json
{ "name": "get_dependencies", "arguments": { "name": "UiButton" } }
text
# 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.

ParameterTypeRequiredLimitsDescription
entitystringone of three—Entity name — return the documentation linked to it
uristringone of three—Document URI, e.g. doc://component/UiButton
levelstringone of threeproject|workspace|component|collectionDocumentation level; without entity/uri returns the list of documents of that level
collectionstringno—Collection name (ADR, guidelines) — a refinement for level
projectstringno—Workspace
sectionstringno—Section heading (H2/H3) — return only that section
includeContentbooleanno—For a document list: return the text as well, not only the summary
limitintegerno1–20Maximum number of documents in the list, 10 by default
json
{ "name": "get_documentation", "arguments": { "entity": "UiButton" } }
text
# 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). The json format is suitable for visualisation.

ParameterTypeRequiredLimitsDescription
entitystringyes—Entity name — the centre of the graph
kindstringnocomponent|composable|store|route|utilNarrow down the entity kind
projectstringno—Workspace, when the same name exists in several projects
depthintegerno1–3Traversal depth over code, 1 by default
includeDocsbooleanno—Include documents and their relations (included by default)
formatstringnotext|jsonResponse format, text by default
json
{ "name": "get_knowledge_graph", "arguments": { "entity": "UiButton" } }
text
# 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

MIT Licensed