Skip to main content

system_discovery - MCP Tool Specification

Overview​

This document specifies the Model Context Protocol (MCP) tools provided by the system_discovery module.

Available Tools​

tool_name​

Description: [Tool description]

Parameters:

{
"param1": {
"type": "string",
"description": "Parameter description",
"required": true
},
"param2": {
"type": "integer",
"description": "Parameter description",
"required": false,
"default": 0
}
}

Returns: Return value description

Example:

{
"tool": "tool_name",
"parameters": {
"param1": "value",
"param2": 42
}
}

Tool Registration​

Tools are defined with the @mcp_tool decorator in mcp_tools.py and are auto-discovered by the PAI MCP bridge; no manual registration call is needed. The decorated functions can also be called directly:

from codomyrmex.system_discovery.mcp_tools import health_check, list_modules

modules = list_modules()
status = health_check()

Tool: discover_system_capabilities​

1. Tool Purpose and Description​

Discovers and catalogs system capabilities, installed modules, and available resources within the Codomyrmex ecosystem.

2. Invocation Name​

discover_system_capabilities

3. Input Schema (Parameters)​

Parameter NameTypeRequiredDescriptionExample Value
scan_depthstringNoDepth of discovery scan (basic, detailed, full)"detailed"
include_modulesbooleanNoWhether to scan individual modules for capabilitiestrue
include_resourcesbooleanNoWhether to scan system resourcestrue
output_formatstringNoOutput format (json, text, summary)"json"

4. Output Schema (Return Value)​

{
"capabilities": {
"modules": ["ai_code_editing", "static_analysis", "data_visualization"],
"resources": {
"cpu_cores": 8,
"memory_gb": 16,
"storage_gb": 256
},
"integrations": ["ollama", "docker", "kubernetes"]
},
"system_info": {
"platform": "macOS",
"python_version": "3.10.5",
"codomyrmex_version": "0.1.0"
},
"scan_timestamp": "2025-01-18T13:46:57.230Z"
}

Tool: get_system_status​

1. Tool Purpose and Description​

Retrieves system status including health metrics, active processes, and system utilization.

2. Invocation Name​

get_system_status

3. Input Schema (Parameters)​

Parameter NameTypeRequiredDescriptionExample Value
include_healthbooleanNoInclude system health metricstrue
include_processesbooleanNoInclude running process informationfalse
include_modulesbooleanNoInclude module status informationtrue

4. Output Schema (Return Value)​

{
"health_status": "healthy",
"system_metrics": {
"cpu_usage": 45.2,
"memory_usage": 68.1,
"disk_usage": 23.4
},
"module_status": {
"active_modules": 27,
"healthy_modules": 26,
"warnings": 1
},
"timestamp": "2025-01-18T13:46:57.230Z"
}

Tool: scan_module_capabilities​

1. Tool Purpose and Description​

Scans specific modules for their capabilities, exported functions, and integration points.

2. Invocation Name​

scan_module_capabilities

3. Input Schema (Parameters)​

Parameter NameTypeRequiredDescriptionExample Value
module_namestringYesName of the module to scan"ai_code_editing"
include_functionsbooleanNoInclude exported function signaturestrue
include_dependenciesbooleanNoInclude module dependenciestrue

4. Output Schema (Return Value)​

{
"module_name": "ai_code_editing",
"capabilities": {
"functions": [
"generate_code_snippet",
"refactor_code_snippet",
"analyze_code_quality"
],
"languages": ["python", "javascript", "java", "cpp"],
"providers": ["openai", "anthropic", "google"]
},
"dependencies": ["llm", "pattern_matching"],
"mcp_tools": ["generate_code_snippet", "refactor_code_snippet"]
}