codemap_label_search

Search for labeled entities with pagination. Filter by labels, patterns, or types.

labelssearchfindfilter

Parameters

NameTypeRequiredDescription
labelIdstring|array❌ OptionalFilter by label ID(s)
targetPatternstring❌ OptionalGlob pattern for target paths
targetTypestringfile | directory | symbol❌ OptionalFilter by target type
pagenumber❌ OptionalPage number (default: 1)
pageSizenumber❌ OptionalResults 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
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_list to see available labels first
  • Use pagination for large result sets
  • Filter by targetType to narrow results (file, directory, symbol)
  • Use glob patterns in targetPattern for directory-specific searches

Related Tools