Skip to main content

🛠️ MCP Tools Reference

Complete reference for all 14 MCP tools available in Archon, with parameters, return types, and usage examples.

📚Tool Organization

Archon provides 14 MCP tools organized into three categories:

  • 🧠 RAG & Knowledge Management (7 tools)
  • 📊 Project & Task Management (5 tools)
  • 🏥 System & Monitoring (2 tools)

All tools communicate with the Server service via HTTP APIs.

🧠 RAG & Knowledge Management Tools

perform_rag_query

Purpose: Perform semantic search across your knowledge base

Parameters:

NameTypeRequiredDescription
querystringSearch query text
sourcestringFilter by source domain
match_countintegerMax results (default: 5)

Returns:

{
"results": [
{
"id": 123,
"content": "Matched content...",
"url": "https://source.com/page",
"title": "Page Title",
"similarity_score": 0.92,
"metadata": {
"source_id": "source.com",
"headers": ["Section 1", "Section 2"]
}
}
],
"query": "original query",
"total_results": 5
}

Example Usage:

"Search for React hooks documentation"

Tool call:
perform_rag_query(
query="React hooks useState useEffect",
source="react-docs",
match_count=10
)

search_code_examples

Purpose: Search for code examples with AI-generated summaries

Parameters:

NameTypeRequiredDescription
querystringCode search query
source_idstringFilter by source
match_countintegerMax results (default: 5)

Returns:

{
"results": [
{
"id": 456,
"code": "const [state, setState] = useState(initialValue);",
"language": "javascript",
"file_path": "hooks/useState.js",
"summary": "React useState hook initialization",
"url": "https://source.com/examples",
"similarity_score": 0.89
}
],
"total_results": 3
}

crawl_single_page

Purpose: Crawl and index a single web page

Parameters:

NameTypeRequiredDescription
urlstringURL to crawl
chunk_sizeintegerChunk size (default: 5000)

Returns:

{
"success": true,
"url": "https://example.com/page",
"title": "Page Title",
"chunks_created": 12,
"content_length": 45000,
"metadata": {
"crawled_at": "2024-01-15T10:30:00Z",
"processing_time": 2.5
}
}

smart_crawl_url

Purpose: Intelligently crawl based on URL type (sitemap, text file, or webpage)

Parameters:

NameTypeRequiredDescription
urlstringURL to crawl
max_depthintegerMax crawl depth (default: 3)
chunk_sizeintegerChunk size (default: 5000)

Returns:

{
"success": true,
"crawl_type": "sitemap",
"urls_processed": 150,
"chunks_created": 1250,
"errors": [],
"duration": 180.5,
"source_id": "docs.example.com"
}

Crawl Types:

  • Sitemap: Automatically detects and processes sitemap.xml
  • Text File: Direct processing of .txt files
  • Webpage: Recursive crawling following links

get_available_sources

Purpose: List all indexed sources in the knowledge base

Parameters: None

Returns:

{
"sources": [
{
"source_id": "react-docs",
"title": "React Documentation",
"description": "Official React documentation",
"url": "https://react.dev",
"document_count": 450,
"last_updated": "2024-01-14T08:00:00Z",
"tags": ["react", "javascript", "frontend"]
}
],
"total_count": 12
}

upload_document

Purpose: Upload and process documents (PDF, Word, Markdown, Text)

Parameters:

NameTypeRequiredDescription
filenamestringName of the document
contentstringDocument content (base64 for binary)
doc_typestringType: general/technical/business

Returns:

{
"success": true,
"document": {
"id": 789,
"filename": "architecture.pdf",
"doc_type": "technical",
"chunks_created": 45,
"processing_time": 5.2,
"file_size": 2048576
}
}

delete_source

Purpose: Remove all content from a specific source

Parameters:

NameTypeRequiredDescription
sourcestringSource identifier to delete

Returns:

{
"success": true,
"source": "old-docs.com",
"documents_deleted": 125,
"chunks_deleted": 890,
"code_examples_deleted": 45
}

📊 Project & Task Management Tools

manage_project

Purpose: Unified project management with action-based patterns

Parameters:

NameTypeRequiredDescription
actionstringAction: create/list/get/delete
project_idstringConditionalRequired for get/delete
titlestringConditionalRequired for create
prdobjectProduct requirements document
github_repostringGitHub repository URL

Actions & Returns:

// Request
{
"action": "create",
"title": "Authentication System",
"github_repo": "https://github.com/team/auth"
}

// Response
{
"success": true,
"project": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Authentication System",
"github_repo": "https://github.com/team/auth",
"created_at": "2024-01-15T10:00:00Z"
}
}

manage_task

Purpose: Complete task lifecycle management

Parameters:

NameTypeRequiredDescription
actionstringAction: create/list/get/update/delete/archive
task_idstringConditionalRequired for get/update/delete/archive
project_idstringConditionalRequired for create, optional for list
filter_bystringFilter: status/project
filter_valuestringValue for filter
titlestringConditionalRequired for create
descriptionstringTask description
assigneestringUser/Archon/AI IDE Agent
update_fieldsobjectConditionalFields to update

Example Task Creation:

{
"action": "create",
"project_id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Implement login endpoint",
"description": "Create POST /api/auth/login endpoint",
"assignee": "AI IDE Agent",
"sources": [
{"name": "Auth Spec", "url": "https://docs/auth"}
]
}

manage_document

Purpose: Document management within projects

Parameters:

NameTypeRequiredDescription
actionstringAction: add/list/get/update/delete
project_idstringProject UUID
doc_idstringConditionalRequired for get/update/delete
document_typestringConditionalRequired for add
titlestringConditionalRequired for add
contentobjectDocument content
metadataobjectTags, status, version

manage_versions

Purpose: Document version control

Parameters:

NameTypeRequiredDescription
actionstringAction: create/list/get/restore
project_idstringProject UUID
field_namestringField to version
version_numberintegerConditionalFor get/restore
contentobjectConditionalFor create
change_summarystringVersion description

get_project_features

Purpose: Retrieve features from a project

Parameters:

NameTypeRequiredDescription
project_idstringProject UUID

Returns:

{
"success": true,
"features": [
{
"id": "feat-001",
"name": "User Authentication",
"description": "Login/logout functionality",
"priority": "high",
"tasks": ["task-001", "task-002"]
}
]
}

🏥 System & Monitoring Tools

health_check

Purpose: Check system health and service status

Parameters: None

Returns:

{
"status": "healthy",
"services": {
"server": "running",
"database": "connected",
"mcp": "active"
},
"tools_available": 14,
"version": "2.0.0",
"uptime": "5:23:45",
"last_error": null
}

session_info

Purpose: Get MCP session information

Parameters: None

Returns:

{
"current_session": {
"id": "abc-123-def",
"created_at": "2024-01-15T10:00:00Z",
"last_activity": "2024-01-15T10:45:00Z",
"client_type": "cursor"
},
"active_sessions": 3,
"total_tool_calls": 1250,
"uptime_seconds": 19425
}

🎯 Best Practices

Error Handling

All tools return consistent error responses:

{
"success": false,
"error": "Error message",
"error_type": "ValidationError",
"details": {
"field": "url",
"message": "Invalid URL format"
}
}

Performance Tips

  1. Use source filters when searching to improve speed
  2. Batch operations when possible (e.g., multiple task creates)
  3. Set appropriate chunk_size for your content type
  4. Use match_count wisely - more results = slower

Tool Selection

  • Use perform_rag_query for general searches
  • Use search_code_examples specifically for code
  • Use smart_crawl_url for unknown URL types
  • Use manage_* tools for CRUD operations