Text editor, shell and memory
Three ready-made client tools that Syntic models are tuned to use consistently: a file editor, a shell and a memory folder. You add one by type name, without writing a schema; the model calls it with fixed, documented commands; your application runs them. They are the building blocks of coding agents and long-running assistants, and they work the same way Syntic Code uses its own tools.
| Type | What the model can do |
|---|---|
syntic_text_editor | View files and folders, create files, replace exact text, insert lines, undo. |
syntic_shell | Run shell commands; state carries over between calls. |
syntic_memory | Read and write notes in a /memories folder that survives between conversations. |
When to use them
- Building a coding or file-handling agent: use the editor and shell instead of designing your own tools.
- Assistants that should remember preferences and progress across sessions: use memory.
Endpoint and auth
POST https://app.syntic.ai/v1/chat/completions (and Messages), Authorization: Bearer sk_live_....
Tool definitions
| Field | Applies to | Details |
|---|---|---|
type | all | One of the three type names. |
root | editor, memory | Optional display path the model should treat as the top folder, for example "/workspace". |
max_output_chars | shell | Optional. Tells the model you will truncate long output to this length. |
Commands
The model’s tool call has a command field plus arguments.
syntic_text_editor
command | Arguments | Your code should return |
|---|---|---|
view | path, optional range: [start, end] | File contents with line numbers, or a folder listing two levels deep. |
create | path, content | Confirmation. Fail if the file exists. |
replace | path, old_text, new_text | Confirmation. Fail unless old_text appears exactly once. |
insert | path, after_line, text | Confirmation. |
undo | path | Confirmation after restoring the previous version. |
syntic_shell
command | Arguments | Your code should return |
|---|---|---|
run | cmd, optional timeout_seconds | Combined stdout and stderr, and the exit code. |
restart | none | Confirmation after starting a fresh session. |
syntic_memory
command | Arguments | Your code should return |
|---|---|---|
list | none | Files under /memories. |
read | path | File contents. |
write | path, content | Confirmation (create or overwrite). |
edit | path, old_text, new_text | Confirmation. |
delete | path | Confirmation. |
Report failures as text in the tool result (“Error: old_text found 3 times”); the model corrects itself.
These tools run on your machines. Confine the editor and memory to one folder (reject .. and absolute paths outside it), run the shell in a container or sandbox, and ask the user before destructive commands. Memory files can contain anything a user said; treat them as user data.
Examples
curl https://app.syntic.ai/v1/chat/completions \
-H "Authorization: Bearer $SYNTIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Syntic Code",
"stream": false,
"tools": [
{ "type": "syntic_text_editor", "root": "/workspace" },
{ "type": "syntic_shell", "max_output_chars": 20000 }
],
"messages": [{ "role": "user", "content": "The tests in tests/test_dates.py fail. Find the bug and fix it." }]
}'Errors
| Status | code | Cause |
|---|---|---|
| 400 | unknown_tool_type | Misspelled type name. |
| 400 | duplicate_tool_type | The same standard tool listed twice. |
| 400 | tool_name_conflict | A function tool uses a reserved syntic_ name. |
Cost
Standard tools are free to use. Their built-in definitions add a small fixed number of input tokens (about 300 each) and are usually served from cache.
Build notes for the platform team
- Mostly documentation plus prompt tuning: expand each type into its schema and short instructions on the server.
- Keep command names and arguments stable; changes go behind the API version header.
- Reserve the
syntic_prefix for built-in tools.