Skip to content

Implementations

Implementations Type-safe
  1. Define a tool in the nara webapp (name, parameters schema, result schema, execution type EDGE or DESKTOP).
  2. Run edge-connector generate to scaffold language-specific stubs.
  3. Fill in the business logic in the generated files.
  4. Use edge-connector test to execute the tool locally.
  5. Package and upload your implementations when you are ready.

Typical structure:

custom-implementations (TypeScript)
custom-implementations/
├─ package.json
├─ tsconfig.json
├─ index.ts # exports all tools
└─ tools/
└─ my_tool.ts # generated stub for 'my_tool'

The generated tool stub includes:

  • a strongly typed input parameter object validated against the tool schema,
  • a typed result shape,
  • a context object with user, org, and deployment metadata.

Implement your logic in the generated functions; keep the signatures intact so the CLI and runtime can type-check them.

Tool implementations receive a context object that typically includes:

  • user identity (for example userId)
  • organization ID
  • deployment metadata (hostname, platform)

Use this to:

  • enforce your own authorization checks,
  • route requests to the correct downstream systems,
  • add audit logging to your own observability stack.