KS
Killer-Skills

add-endpoint — how to use add-endpoint how to use add-endpoint, add-endpoint setup guide, containerized access to Switcher devices, aioswitcher API methods, add-endpoint vs other smart device skills, add-endpoint install for developers, what is add-endpoint, add-endpoint alternative for device control, add-endpoint tutorial for AI agents

v1.0.0
GitHub

About this Skill

Perfect for Python-based AI Agents needing to control and query local Switcher smart devices through containerized access add-endpoint is a skill that allows developers to gain containerized access to their local Switcher smart devices, enabling new endpoint creation and device control functionality

Features

Defines endpoint path constants in app/webapp.py
Creates async handler functions with decorators like @routes.get
Supports adding new device control functionality
Exposes new aioswitcher API methods
Enables creating new query endpoints

# Core Topics

TomerFi TomerFi
[0]
[0]
Updated: 3/6/2026

Quality Score

Top 5%
51
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add TomerFi/switcher_webapi/add-endpoint

Agent Capability Analysis

The add-endpoint MCP Server by TomerFi is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use add-endpoint, add-endpoint setup guide, containerized access to Switcher devices.

Ideal Agent Persona

Perfect for Python-based AI Agents needing to control and query local Switcher smart devices through containerized access

Core Value

Empowers agents to add new device control functionality and expose aioswitcher API methods, leveraging Python's async capabilities and RESTful API endpoints like GET, POST, PATCH, and DELETE

Capabilities Granted for add-endpoint MCP Server

Adding new device control functionality
Exposing new aioswitcher API methods
Creating new query endpoints

! Prerequisites & Limits

  • Requires modification of app/webapp.py
  • Limited to Switcher smart devices
  • Python 3.x compatibility required
Project
SKILL.md
2.0 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Adding a New Endpoint

When to Use

  • Adding new device control functionality
  • Exposing new aioswitcher API methods
  • Creating new query endpoints

Step 1: Define Endpoint Constant

In app/webapp.py, add the endpoint path constant (around line 54-71):

python
1ENDPOINT_YOUR_ENDPOINT = "/switcher/your_endpoint"

Step 2: Create Handler Function

Add the async handler with the appropriate decorator:

python
1@routes.get(ENDPOINT_YOUR_ENDPOINT) # or .post, .patch, .delete 2async def your_endpoint(request: web.Request) -> web.Response: 3 """Describe what this endpoint does.""" 4 device_type = DEVICES[request.query[KEY_TYPE]] 5 if KEY_LOGIN_KEY in request.query: 6 login_key = request.query[KEY_LOGIN_KEY] 7 else: 8 login_key = "00" 9 async with SwitcherApi( 10 device_type, request.query[KEY_IP], request.query[KEY_ID], login_key 11 ) as swapi: 12 result = await swapi.your_method() 13 return web.json_response(_serialize_object(result))

Step 3: Add Tests

In app/tests/test_web_app.py, add test cases:

python
1@mark.parametrize("url", [ 2 "/switcher/your_endpoint?type=plug&id=ab1c2d&ip=1.2.3.4", 3 "/switcher/your_endpoint?type=plug&id=ab1c2d&ip=1.2.3.4&key=18", 4]) 5async def test_successful_your_endpoint_get_request(api_client, url): 6 with patch("app.webapp.SwitcherApi") as mock_api: 7 mock_api.return_value.__aenter__.return_value.your_method = AsyncMock( 8 return_value=expected_response 9 ) 10 resp = await api_client.get(url) 11 assert resp.status == 200

Step 4: Update Documentation

Create or update the relevant docs file in docs/:

  • Add endpoint to the appropriate endpoints_*.md file
  • Include method, path, description, and query parameters

Step 5: Run Tests

Use the /test command to run tests with coverage.

Reference

Look at existing endpoints for patterns:

  • get_state - Simple GET returning device state
  • turn_on - POST with optional body parameters
  • control_breeze_device - PATCH with complex body handling

Related Skills

Looking for an alternative to add-endpoint or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication