External Access, Search, and Annotation Functions
These functions let CodeBot run approved external actions, inspect folders and web pages, recheck MCP endpoints, open URLs for the user, search project files, and show review annotations.
Terminal, Folders, URLs, and MCP
executeTerminalCommandruns an arbitrary terminal command in the current solution folder and returns stdout and stderr. It requires approval. An optionalcommandPrefixlets the user approve a reusable command prefix.listContentsOfFolderlists the direct contents of an absolute local folder path. It is useful for explicit folder requests or paths outside the solution model.getTextContentOfUrlfetches text content from anhttporhttpsURL. The user can approve the exact URL, the website, or broader web access.recheckMcpsreconnects configured MCP endpoints and reports which MCP tools, resources, and prompts are available. It does not edit MCP configuration.openUrlForUseropens an approved URL for the user in the browser or associated local app. It is for showing or launching a URL, not reading its contents.
Prefer host or solution-specific discovery tools before using generic terminal or folder functions. Use getTextContentOfUrl when CodeBot needs to inspect a page; use openUrlForUser only when the user wants the URL opened.
Search
performSearchAndGetResultssearches for a string in the current solution or workspace and returns matching file paths. It accepts search options for case sensitivity, whole-word matching, regular-expression mode, and result mode.
Use this for shared CodeBot search behavior when a host-specific richer search surface is not available.
Diff Annotations
showDiffshows a diff annotation in the chat from old and new text. It does not modify files. It can include afilePath,summary, and labels for the old and new sides.
Use showDiff when the user should review a proposed change or compare generated content before another action writes it.
Diagnostic Helpers
CodeBot also has small diagnostic/test helper functions:
takeLongsimulates a long-running tool with progress.askForApprovalexercises the approval flow.addAnnotationexercises annotation display.askMeQuestionsexercises question/answer UI behavior.
These are useful for development and testing. They should not be treated as normal user-facing workflow tools.
When To Use Which Tool
Use executeTerminalCommand only when the action really needs the shell.
Use listContentsOfFolder for direct folder inspection outside the solution model.
Use getTextContentOfUrl to read web text and openUrlForUser to open a URL for the user.
Use recheckMcps when a configured MCP-backed capability appears unavailable.
Use performSearchAndGetResults for text search over known project/workspace files.
Use showDiff for review-only comparisons.