> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zocomputer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit space route

> Edit an existing route's code by supplying only the changed sections.

{/* Tool: edit_space_route */}

Preferred for edits to existing routes, including the built-in starter homepage at `/`. Use `// ... existing code ...` as a placeholder for unchanged regions; the partial edit is merged against the current route code.

## Parameters

<ParamField path="path" type="string" required={true}>
  Route path of the existing route to edit, e.g. '/about' or '/api/hello'.
</ParamField>

<ParamField path="code_edit" type="string" required={true}>
  Partial edit — only the changed sections. Use '// ... existing code ...' for unchanged parts.
</ParamField>

<ParamField path="edit_instructions" type="string" default={""}>
  A sentence describing what the edit does, to help disambiguate.
</ParamField>

<ParamField path="public" type="string" default={""}>
  Optional visibility override for page routes. Omit to preserve current visibility. API routes are always public.
</ParamField>
