# Add Backend Tools to OpenAI Function Calling

Adding backend agent tools requires coordinated changes across implementation, schemas, dispatch, and permissions. This skill provides a focused workflow for those changes.

## Install

```bash
npx skillstore add applelamps/add-backend-tool
```

## Metadata

- Status: approved
- Slug: applelamps-add-backend-tool
- Skillstore revision: r2
- Version status: missing
- Tree hash: cb7bed6956ddca1c1ac5cb9fa8208eb0babd97f6b497fb05c8c1c7f6744a378d
- Author: AppleLamps
- GitHub username: AppleLamps
- License: MIT
- Repository: https://github.com/AppleLamps/web-term/tree/main/.claude/skills/add-backend-tool
- Ref: 89edfdc710d0846129dcee6a929477b04f08052c
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 79
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/applelamps-add-backend-tool
- Manifest: https://skillstore.pages.dev/api/skills/applelamps-add-backend-tool/manifest

## Capabilities

- Inspects existing tool definitions and helper patterns in backend/main.py.
- Creates a typed Python helper with error handling.
- Adds a function definition with descriptions, properties, types, and required parameters.
- Connects the new function to the WebSocket invocation handler.
- Reviews agent and chat mode access restrictions for the new tool.
- Applies guidance for timeouts, secret handling, and function documentation.

## Use Cases

- Add a Read-Only Utility: Create a backend tool that reads application data and expose it under appropriate mode restrictions.
- Extend an Agent Workflow: Add a typed function that lets an agent perform a project-specific operation through existing dispatch logic.
- Standardize Tool Contributions: Apply one implementation pattern when reviewing new helpers, schemas, handlers, and access rules.

## Prompt Templates

### Add a Simple Tool

```
Add a backend tool named [name] that accepts [parameters] and returns [result]. Follow the existing patterns in backend/main.py.
```

### Add a Read-Only Tool

```
Create a read-only backend tool for [task]. Define its schema, connect dispatch, and assess whether chat mode access is appropriate.
```

### Add a Mutating Tool

```
Implement a backend tool that performs [operation]. Validate inputs, add a timeout, handle failures, and restrict access to the safest suitable mode.
```

### Integrate a Complex Tool

```
Add [tool] with typed parameters, bounded execution, structured errors, secret-safe configuration, dispatch integration, mode restrictions, and focused tests for success and failure paths.
```

## Limitations

- Assumes the project keeps tool definitions and dispatch logic in backend/main.py.
- Provides a generic implementation pattern, not a complete tool for a specific service.
- Does not automatically add tests, authentication, input sanitization, or sandboxing.
- Requires developers to decide whether each tool is safe for chat mode.

## Best Practices

- Match existing helper, schema, and dispatch conventions before adding new behavior.
- Validate every argument and apply timeouts to operations that can block.
- Grant chat mode access only to tools with reviewed, limited, and safe behavior.

## Anti Patterns

- Do not hardcode credentials, tokens, or private endpoints in helper functions.
- Do not expose mutating or unrestricted tools to chat mode without authorization controls.
- Do not define schema parameters that the helper ignores or interprets differently.

## Security Audit

- Audited at: 2026-07-23T05:12:56.638\+00:00
- Summary: All eight external-command alerts are Markdown formatting or fenced Python examples, not shell execution. The access-mode note contains no network probing behavior. No malicious intent, prompt injection, or data exfiltration instructions were found.

## Stats

- Views: 209
- Downloads: 10
- Favorites: 0
- Popularity score: 0
