codemap_label_search
Search for labeled entities with pagination. Filter by labels, patterns, or types.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
labelId | string|array | ❌ Optional | Filter by label ID(s) |
targetPattern | string | ❌ Optional | Glob pattern for target paths |
targetType | stringfile | directory | symbol | ❌ Optional | Filter by target type |
page | number | ❌ Optional | Page number (default: 1) |
pageSize | number | ❌ Optional | Results per page (max: 100) (default: 20) |
Usage Examples
MCP Usage (for AI Agents like Claude)
json
{
"name": "codemap_label_search",
"arguments": {
"labelId": "lbl_work_in_progress_241291"
}
}Example Output
JSON Response
json
{
"results": [
{
"target": "components/docs/DocsSidebar.vue",
"targetType": "file",
"labels": [
{
"id": "lbl_components_317849",
"emoji": "🧩",
"name": "Components"
}
]
},
{
"target": "components/docs/DocsTableOfContents.vue",
"targetType": "file",
"labels": [
{
"id": "lbl_components_317849",
"emoji": "🧩",
"name": "Components"
}
]
}
],
"pagination": {
"page": 1,
"pageSize": 20,
"totalResults": 2,
"totalPages": 1
}
}When to Use This Tool
- Find all files with a specific label
- Audit label usage across the project
- Filter labeled entities by type (files vs directories vs symbols)
- Use wildcards to narrow search to specific directories
Common Patterns
Find All Files with Label
Search Within Directory
Multiple Label Filter
codemap_label_search({ labelId: "lbl_work_in_progress_241291" })Search Within Directory
codemap_label_search({
labelId: "lbl_components_317849",
targetPattern: "src/components/**/*"
})Multiple Label Filter
codemap_label_search({
labelId: ["lbl_api_312956", "lbl_auth_308477"]
})Pro Tips
- Combine with
label_listto see available labels first - Use pagination for large result sets
- Filter by
targetTypeto narrow results (file, directory, symbol) - Use glob patterns in
targetPatternfor directory-specific searches