{"id":32696347,"url":"https://github.com/saharmor/tool-use-scheme-generator","last_synced_at":"2026-05-15T08:04:53.445Z","repository":{"id":321681453,"uuid":"1086783896","full_name":"saharmor/tool-use-scheme-generator","owner":"saharmor","description":"Create OpenAI function-calling schemas without writing JSON by hand","archived":false,"fork":false,"pushed_at":"2025-10-30T22:54:17.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-31T00:28:31.068Z","etag":null,"topics":["claude-code","gpt-5","llms"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saharmor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-30T22:41:06.000Z","updated_at":"2025-10-30T22:54:20.000Z","dependencies_parsed_at":"2025-10-31T00:28:33.011Z","dependency_job_id":null,"html_url":"https://github.com/saharmor/tool-use-scheme-generator","commit_stats":null,"previous_names":["saharmor/tool-use-scheme-generator"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/saharmor/tool-use-scheme-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saharmor%2Ftool-use-scheme-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saharmor%2Ftool-use-scheme-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saharmor%2Ftool-use-scheme-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saharmor%2Ftool-use-scheme-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saharmor","download_url":"https://codeload.github.com/saharmor/tool-use-scheme-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saharmor%2Ftool-use-scheme-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282188968,"owners_count":26628981,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-01T02:00:06.759Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-code","gpt-5","llms"],"created_at":"2025-11-01T19:00:51.634Z","updated_at":"2025-11-01T19:02:23.760Z","avatar_url":"https://github.com/saharmor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# ✨ Tool Calls Schema Generator\n\nA lightweight, static web app for generating valid tool use JSON schemas for **Claude (Anthropic)** and **OpenAI**. Define functions and parameters with advanced validation options, then copy, download, import, or share your configurations.\n\n\u003cp\u003e\n\u003ca href=\"https://www.linkedin.com/in/sahar-mor/\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/LinkedIn-Connect-blue\" alt=\"LinkedIn\"\u003e\u003c/a\u003e\n\u003ca href=\"https://x.com/theaievangelist\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/:theaievangelist\" alt=\"X\"\u003e\u003c/a\u003e\n\u003ca href=\"http://aitidbits.ai/\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/saharmor/saharmor.github.io/blob/main/images/ai%20tidbits%20logo.png?raw=true\" alt=\"Stay updated on AI\" width=\"20\" height=\"20\" style=\"vertical-align: middle;\"\u003e Stay updated on AI\u003c/a\u003e\n\n\u003c/p\u003e\n\n\u003cimg width=\"1674\" height=\"1101\" alt=\"Toolsuse\" src=\"https://github.com/user-attachments/assets/c2df9caf-35d0-499a-9500-727a7cd1281a\" /\u003e\n\n\n\u003c/div\u003e\n\n## Live App\n\n**[Launch the Generator →](https://toolsuse.dev)**\n\n\n## Features\n\n- **Multi-Format Support**: Generate schemas for both Claude/Anthropic and OpenAI formats\n- **Format Selector**: Easily switch between Claude and OpenAI output formats\n- **Live JSON Preview**: Real-time visualization of your schema\n- **Validation**: Inline validation with helpful error messages\n- **Smart Import**: Auto-detects and imports both Claude and OpenAI formats\n- **Actions**:\n  - Copy JSON to clipboard\n  - Download as `tools.json`\n  - Import existing JSON schemas (both formats)\n  - Share via URL (base64-encoded state)\n  - Reset all\n- **Persistence**: Auto-save to localStorage\n\n## How to Use\n\n### Creating a Function\n\n1. Click **\"+ Add Function\"**\n2. Enter a function name (use snake_case: `get_weather`, `search_products`)\n3. Add a brief description\n4. Click **\"+ Add Parameter\"** to define inputs\n\n### Defining Parameters\n\nFor each parameter, specify:\n- **Key**: Parameter name (required)\n- **Type**: string, number, integer, boolean, array, or object\n- **Description**: What this parameter does\n- **Required**: Check if mandatory\n\nClick **\"Advanced\"** for additional constraints like enum values, min/max, patterns, etc.\n\n### Working with the Schema\n\n- **Format Selection**: Use the dropdown in the preview panel to choose between Claude/Anthropic or OpenAI format\n- **Copy**: Click \"Copy\" to copy the JSON to your clipboard\n- **Download**: Save as `tools.json`\n- **Import**: Paste an existing tools JSON array (either format) to edit\n- **Share**: Generate a shareable URL with your configuration\n- **Validation**: Automatic validation with helpful error messages\n\n### Using with Claude (Anthropic)\n\n```python\nimport anthropic\n\nclient = anthropic.Anthropic(api_key=\"your-api-key\")\n\ntools = [\n  {\n    \"name\": \"get_weather\",\n    \"description\": \"Get the current weather in a given location\",\n    \"input_schema\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"location\": {\n          \"type\": \"string\",\n          \"description\": \"The city and country, e.g. Berlin, Germany\"\n        },\n        \"unit\": {\n          \"type\": \"string\",\n          \"enum\": [\"celsius\", \"fahrenheit\"],\n          \"description\": \"Temperature unit\"\n        }\n      },\n      \"required\": [\"location\"]\n    }\n  }\n]\n\nresponse = client.messages.create(\n    model=\"claude-3-5-sonnet-20241022\",\n    max_tokens=1024,\n    tools=tools,\n    messages=[{\"role\": \"user\", \"content\": \"What's the weather in Berlin?\"}]\n)\n```\n\n### Using with OpenAI\n\n```javascript\nimport OpenAI from 'openai';\n\nconst client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });\n\nconst tools = [\n  {\n    \"type\": \"function\",\n    \"function\": {\n      \"name\": \"get_current_weather\",\n      \"description\": \"Get the current weather in a given location\",\n      \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"location\": {\n            \"type\": \"string\",\n            \"description\": \"The city and state, e.g. San Francisco, CA\"\n          },\n          \"unit\": {\n            \"type\": \"string\",\n            \"enum\": [\"celsius\", \"fahrenheit\"]\n          }\n        },\n        \"required\": [\"location\"]\n      }\n    }\n  }\n];\n\nconst response = await client.chat.completions.create({\n  model: \"gpt-4\",\n  messages: [{ role: \"user\", content: \"What's the weather in Boston?\" }],\n  tools: tools\n});\n```\n\n## Sample Schemas\n\nCheck the `/samples` directory for example schemas (Claude/Anthropic format):\n- `weather.json` - Simple function with enum\n- `array.json` - Array parameters with constraints\n- `nested-object.json` - Object with nested properties\n- `multi-tools.json` - Multiple functions in one schema\n\nAll samples use the Claude/Anthropic format. The tool auto-detects format when importing and can export to either format.\n\n## Analytics Setup\n\nThis project includes Google Analytics 4 (GA4) integration. To enable analytics tracking:\n\n1. Get your GA4 Measurement ID from Google Analytics\n2. Update the ID in `index.html` and `src/analytics.js`\n3. See [ANALYTICS_SETUP.md](./ANALYTICS_SETUP.md) for detailed configuration instructions\n\nThe implementation tracks user interactions (button clicks, exports, imports, errors) while respecting user privacy with opt-out capabilities.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaharmor%2Ftool-use-scheme-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaharmor%2Ftool-use-scheme-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaharmor%2Ftool-use-scheme-generator/lists"}