# CAIT

# CAIT - Core AI Toolkit

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y smithery mcp add bitfreak/cait

# Browse available tools
npx -y smithery tool list bitfreak/cait

# Get full schema for a tool
npx -y smithery tool get bitfreak/cait get_file_info

# Call a tool
npx -y smithery tool call bitfreak/cait get_file_info '{}'
```

## Tools (37)

- `get_file_info` — Metadata for a single file: size, line count, permissions, timestamps. Does not read content.
- `get_dir_info` — Directory listing with per-entry metadata. Supports glob patterns and recursion.
- `append_file` — Append text to a file. Useful for NOTES.md, TASKS.md, log files.
- `download_file` — Download a URL to `~/.cait/files/` (or `CAIT_FILES_PATH`). Returns the local path.
- `fetch_url` — HTTP GET/POST with custom headers and body. Use `save_to` to avoid large responses in context. `convert=True` returns c…
- `repl_exec` — Execute Python code in a persistent session. Variables, imports, and function definitions survive between calls. Return…
- `repl_read` — Inspect a named variable from the REPL session without executing code. Returns repr, type, and JSON value.
- `repl_vars` — List all user-defined variables in the current REPL session. Returns name, type, repr, and JSON value for each. Useful …
- `repl_reset` — Clear all variables and imports from the REPL session.
- `find_definitions` — Find all definitions of a function, class, or variable. Returns file, line, docstring, and kind.
- `find_calls` — Find all call sites of a function. Matches bare calls, method calls, and chained calls.
- `find_imports` — Find all files that import a given module or name.
- `find_references` — Find all uses of an identifier (loads, stores, deletes, attribute accesses).
- `search_text` — Semantically search or summarize a text string or plain text file (`.txt`, `.md`, `.rst`).
- `encode_text` — Return raw 384-dimensional float embeddings for one or more strings or files.
- `text_similarity` — Cosine similarity between two texts (0–1).
- `convert_doc` — Convert PDF, DOCX, PPTX, XLSX, HTML, LaTeX, images, audio, and more to markdown or plain text.
- `search_doc` — Same as `search_text` but handles many document formats (PDF, DOCX, HTML, URLs). Converts via `convert_doc` on first ca…
- `wiki_search` — Search Wikipedia. Returns titles, snippets, word counts, and URLs.
- `wiki_sections` — List all sections of a page as a table of contents (no text).
- `wiki_section` — Get the text of a specific section. Use `wiki_sections` first to find section titles.
- `wiki_page` — Get full page text or just the summary (`summary_only=True`). Supports non-English via `language` parameter.
- `arxiv_search` — Search arXiv. Supports field prefixes (`ti:`, `au:`, `abs:`, `cat:`) and boolean operators. Returns metadata for up to …
- `arxiv_paper` — Fetch a paper by ID. `full_text=False` (default) returns abstract + metadata. `full_text=True` downloads and converts t…
- `get_datetime` — Current date, time, timezone, UTC offset, weekday, and Unix timestamp. Accepts any IANA timezone name.
- `timer_start` — Start a named wall-clock timer.
- `timer_stop` — Stop a timer and return elapsed seconds.
- `timer_list` — List all running timers and their current elapsed time.
- `diff_text` — Unified diff between two strings or files. Returns diff text plus added/removed line counts.
- `mem_add` — Add a new entry. Fields: `title`, `content` (embedded), `tags`, `description`, `source`, `entry_id`.
- `mem_search` — Find entries by semantic similarity to a query. Optionally filter by tags.
- `mem_get` — Retrieve a full entry by ID.
- `mem_list` — List entries sorted by date (newest first). Content omitted for brevity.
- `mem_set` — Update fields of an existing entry. Only non-empty values are applied.
- `mem_edit` — Edits content in-place — regex replace when pattern is given, or append when not.
- `mem_delete` — Permanently delete an entry by ID.
- `mem_find` — Fast metadata scan — no embedding. Match by title substring, exact source URL, or tags. Use this for deduplication chec…

```bash
# Get full input/output schema for a tool
npx -y smithery tool get bitfreak/cait <tool-name>
```

## Prompts (1)

- `General Guidelines` — The instructions include general guidance for how to behave, how to use CAIT tools, and how to use the Firecrawl search…
