Built-in Tools
The tool schemas MisarCoder ships with, plus the web-fetch and web-search endpoints — /tools, /tools/v2, /tools/web-fetch, /tools/web-search.
MisarCoder ships a fixed set of agent tools — filesystem, editor, git, search, memory, and planning primitives — and exposes two of them as standalone HTTP endpoints.
Base URL: https://api.misar.io/coder. All four endpoints authenticate with Authorization: Bearer <API_KEY>.
List tool schemas
/toolsReturns every built-in tool schema in Anthropic tool format. Takes no parameters.
Response fields
toolsobject[]Tool definitions, each with name, description, and input_schema.
curl https://api.misar.io/coder/tools \
-H "Authorization: Bearer $MISARCODER_API_KEY"{
"tools": [
{ "name": "read_file", "description": "…", "input_schema": {} }
]
}`/tools/v2` returns the same payload
GET /tools/v2 exists and is byte-for-byte identical to GET /tools. It is not a newer schema — use either.
The built-in catalogue
| Area | Tools |
|---|---|
| Filesystem | list_dir, read_file, read_range, write_file, replace_in_file, apply_patch, create_dir, remove, move, copy, stat, glob |
| Search | search, grep, repo_map |
| Editor | list_open_editors, get_selection, get_active_editor, get_diagnostics |
| Shell and tests | run_command, run_tests |
| Git | git_status, git_diff, git_log, git_commit, git_create_branch, git_push, git_undo, git_create_pr |
| Memory | save_memory, memory, recall_episodes, read_working_set, update_working_set |
| Planning | enter_plan_mode, exit_plan_mode, todo_write, todo_read |
| Web | web_fetch |
Most of these execute on the client — the VS Code extension or another agent host — against the user's workspace. The gateway supplies the schema; the host supplies the filesystem.
Web fetch
/tools/web-fetchFetches a URL server-side and returns its text. HTML is tag-stripped; JSON is returned raw.
Request body
urlstringbodyrequiredMust start with https://. Plain http:// is rejected.
max_charsnumberbodydefault: 10000Truncation ceiling. Truncated content is suffixed with a marker naming the limit.
Response fields
okbooleanfalse when the fetch failed. The HTTP status is still 200.
contentstringThe page text, or the failure description when ok is false.
urlstringThe URL actually fetched.
statusnumberUpstream HTTP status, or 0 when the request never completed.
curl -X POST https://api.misar.io/coder/tools/web-fetch \
-H "Authorization: Bearer $MISARCODER_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/docs", "max_chars": 20000 }'{
"ok": true,
"content": "Example Domain …",
"url": "https://example.com/docs",
"status": 200
}{ "ok": false, "content": "HTTP 404: Not Found", "url": "https://example.com/x", "status": 404 }SSRF-guarded
The resolved address is checked before the request is made. Loopback, private, link-local, carrier-grade NAT, unspecified, and reserved ranges are all refused with 400 URL resolves to a private or reserved address, and a DNS failure is treated as blocked. Redirects are not followed, so a public URL cannot bounce into a private one. The request times out after 15 seconds.
Status codes
| Code | Meaning |
|---|---|
200 | Processed — check ok |
400 | URL must start with https:// or URL resolves to a private or reserved address |
401 | Missing authorization or Invalid API key |
422 | Body failed validation |
Web search
/tools/web-searchRuns a web search and returns titles, URLs, and snippets.
Request body
querystringbodyrequiredThe search query. Must not be blank.
max_resultsnumberbodydefault: 5Maximum results to return.
Response fields
okbooleanfalse when the search failed. The HTTP status is still 200.
resultsArray<{title, url, snippet}>Search results. Empty when nothing matched or the search failed.
querystringEcho of the query.
messagestringPresent when there were no results, or when the search failed.
curl -X POST https://api.misar.io/coder/tools/web-search \
-H "Authorization: Bearer $MISARCODER_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "query": "python asyncio task groups", "max_results": 5 }'{
"ok": true,
"results": [
{
"title": "asyncio — Task Groups",
"url": "https://docs.python.org/3/library/asyncio-task.html",
"snippet": "A task group is an asynchronous context manager …"
}
],
"query": "python asyncio task groups"
}{ "ok": true, "results": [], "query": "…", "message": "No results found" }Status codes
| Code | Meaning |
|---|---|
200 | Processed — check ok |
400 | Query must not be empty |
401 | Missing authorization or Invalid API key |
422 | Body failed validation |
Empty results are not an error
Both web endpoints report failures inside a 200 body. Branch on ok, and treat an empty results array as "nothing found or the search could not run" — the message field distinguishes the two.