Implementations
Implementations
Type-safe
custom-implementations (TypeScript) custom-implementations (Python)
Development flow
Section titled “Development flow”- Define a tool in the nara webapp (name, parameters schema, result schema, execution type EDGE or DESKTOP).
- Run
edge-connector generateto scaffold language-specific stubs. - Fill in the business logic in the generated files.
- Use
edge-connector testto execute the tool locally. - Package and upload your implementations when you are ready.
Generated structure
Section titled “Generated structure”Typical structure:
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.
For Python implementations, the generator creates:
custom-implementations/├─ requirements.txt├─ main.py└─ tools/ └─ my_tool.pyThe Python stubs follow the same contract as the TypeScript ones: a strongly-typed args object, a context object, and a structured result matching the tool’s result schema.
Context object basics
Section titled “Context object basics”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.