Help me add a new tool to an existing B4.run app. B4.run discovers shared tools in `src/tools/*.ts` and route-local tools in `src/app/<route>/tools/*.ts`; their types are generated from TypeScript — no Zod schemas or manual type wiring.

1. Choose the tool's scope before creating it:
   - Put tools reused by multiple routes in `src/tools/`. This is where the navlog scaffold keeps `computeNavlog` and `readDoc`.
   - Put a route-specific tool in `src/app/<route>/tools/`. A route-local tool is available only to that route and shadows a shared tool with the same name.

2. Add a TypeScript file with a default export that is an async function. This shared example is the default for the navlog scaffold:

   ```ts
   // src/tools/<tool-name>.ts
   export default async (input: { readonly /* fields */ }) => {
     // do work
     return { /* output */ }
   }
   ```

3. The input parameter type and the return type are both inferred. B4.run extracts them at build time and writes them into `.b4/b4.generated.d.ts`. The tool becomes available on typed `ctx.tools` for eligible workflows and callable graph functions, and `b4 build` wires it into generated agent entries.

4. Run `b4 typegen` to regenerate types after adding the tool (or leave `b4 dev` running — it does this on every file save).

5. For a `workflow`, or a callable `graph` function that explicitly receives B4.run `RuntimeContext`, update `index.ts` to call the tool via `ctx.tools.<tool-name>({ ... })`. A precompiled raw LangGraph object's `.invoke()` treats its second argument as LangGraph `RunnableConfig`, not B4.run's typed `RuntimeContext`; it keeps the tools its implementation already owns or imports rather than expecting workflow-style `ctx.tools`. For an `agent` route, leave `index.ts` as the default `agent(...)` descriptor; B4.run materializes the agent with its eligible tools.

6. Re-run the route with `b4 run` and confirm the new tool is invoked end-to-end.

Constraints:
- The default export must be a function (arrow or async function declaration).
- Input and output types must be serializable as JSON.
- `readonly` is recommended on input fields; B4.run preserves it through type generation.

Reference: https://b4.run/llms.txt
