MisarMisar Docs
MisarMailMisarBlogMisarReachMisarPostMisarDevMisarCoderMisarSEOMisar PlatformMisar SSO
MCP & Tools

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

GET/tools

Returns every built-in tool schema in Anthropic tool format. Takes no parameters.

Response fields

toolsobject[]

Tool definitions, each with name, description, and input_schema.

Request
curl https://api.misar.io/coder/tools \
  -H "Authorization: Bearer $MISARCODER_API_KEY"
200 — OK
{
  "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

AreaTools
Filesystemlist_dir, read_file, read_range, write_file, replace_in_file, apply_patch, create_dir, remove, move, copy, stat, glob
Searchsearch, grep, repo_map
Editorlist_open_editors, get_selection, get_active_editor, get_diagnostics
Shell and testsrun_command, run_tests
Gitgit_status, git_diff, git_log, git_commit, git_create_branch, git_push, git_undo, git_create_pr
Memorysave_memory, memory, recall_episodes, read_working_set, update_working_set
Planningenter_plan_mode, exit_plan_mode, todo_write, todo_read
Webweb_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

POST/tools/web-fetch

Fetches a URL server-side and returns its text. HTML is tag-stripped; JSON is returned raw.

Request body

urlstringbodyrequired

Must start with https://. Plain http:// is rejected.

max_charsnumberbodydefault: 10000

Truncation ceiling. Truncated content is suffixed with a marker naming the limit.

Response fields

okboolean

false when the fetch failed. The HTTP status is still 200.

contentstring

The page text, or the failure description when ok is false.

urlstring

The URL actually fetched.

statusnumber

Upstream HTTP status, or 0 when the request never completed.

Request
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 }'
200 — Fetched
{
  "ok": true,
  "content": "Example Domain …",
  "url": "https://example.com/docs",
  "status": 200
}
200 — Upstream error
{ "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

CodeMeaning
200Processed — check ok
400URL must start with https:// or URL resolves to a private or reserved address
401Missing authorization or Invalid API key
422Body failed validation
POST/tools/web-search

Runs a web search and returns titles, URLs, and snippets.

Request body

querystringbodyrequired

The search query. Must not be blank.

max_resultsnumberbodydefault: 5

Maximum results to return.

Response fields

okboolean

false when the search failed. The HTTP status is still 200.

resultsArray<{title, url, snippet}>

Search results. Empty when nothing matched or the search failed.

querystring

Echo of the query.

messagestring

Present when there were no results, or when the search failed.

Request
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 }'
200 — Results
{
  "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"
}
200 — Nothing found
{ "ok": true, "results": [], "query": "…", "message": "No results found" }

Status codes

CodeMeaning
200Processed — check ok
400Query must not be empty
401Missing authorization or Invalid API key
422Body 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.