MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / help_command_call

Function help_command_call

src/command_system/builtins.py:185–219  ·  view source on GitHub ↗

Handle /help command - show available commands. Args: args: Command arguments (optional search query) context: Command context Returns: LocalCommandResult

(args: str, context: CommandContext)

Source from the content-addressed store, hash-verified

183
184
185def help_command_call(args: str, context: CommandContext) -> LocalCommandResult:
186 """
187 Handle /help command - show available commands.
188
189 Args:
190 args: Command arguments (optional search query)
191 context: Command context
192
193 Returns:
194 LocalCommandResult
195 """
196 registry = get_command_registry()
197 query = args.strip()
198
199 if query:
200 commands = registry.find_commands(query, limit=50)
201 header = f"Commands matching '{query}':"
202 else:
203 commands = registry.list_commands(include_hidden=False)
204 header = "Available commands:"
205
206 lines = [header, ""]
207
208 for cmd in commands:
209 alias_str = f" (aliases: {', '.join(cmd.aliases)})" if cmd.aliases else ""
210 lines.append(f" /{cmd.name}{alias_str}")
211 lines.append(f" {cmd.description}")
212 if cmd.argument_hint:
213 lines.append(f" Usage: /{cmd.name} {cmd.argument_hint}")
214 lines.append("")
215
216 return LocalCommandResult(
217 type="text",
218 value="\n".join(lines),
219 )
220
221
222def skills_command_call(args: str, context: CommandContext) -> LocalCommandResult:

Callers 1

execute_command_syncFunction · 0.85

Calls 6

get_command_registryFunction · 0.85
LocalCommandResultClass · 0.85
find_commandsMethod · 0.80
list_commandsMethod · 0.80
joinMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected