MCPcopy Create free account
hub / github.com/chokcoco/iCSS / setupHandlers

Method setupHandlers

MCP/server.js:158–327  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156 }
157
158 setupHandlers() {
159 debugLog('🔗 Setting up request handlers...');
160
161 this.server.setRequestHandler(ListToolsRequestSchema, async () => {
162 try {
163 debugLog('📋 Received ListTools request');
164 await this.waitForReady();
165
166 const tools = [
167 {
168 name: 'search_css_techniques',
169 description: 'Search for CSS techniques and solutions from iCSS repository issues',
170 inputSchema: {
171 type: 'object',
172 properties: {
173 query: {
174 type: 'string',
175 description: 'Search query for CSS techniques (e.g., "flex layout", "animation", "grid")'
176 },
177 limit: {
178 type: 'number',
179 description: 'Maximum number of results to return (default: 5)',
180 default: 5
181 }
182 },
183 required: ['query']
184 }
185 },
186 {
187 name: 'search_css_demos',
188 description: 'Search for CSS demo examples from CSS-Inspiration repository with complete code',
189 inputSchema: {
190 type: 'object',
191 properties: {
192 query: {
193 type: 'string',
194 description: 'Search query for CSS demos (e.g., "animation", "3d effect", "layout")'
195 },
196 category: {
197 type: 'string',
198 description: 'Filter by category (e.g., "animation", "3d", "layout", "background")'
199 },
200 difficulty: {
201 type: 'string',
202 description: 'Filter by difficulty level (初级, 中级, 高级)'
203 },
204 limit: {
205 type: 'number',
206 description: 'Maximum number of results to return (default: 5)',
207 default: 5
208 }
209 },
210 required: ['query']
211 }
212 },
213 {
214 name: 'get_css_demo',
215 description: 'Get complete demo with HTML and CSS code for a specific CSS-Inspiration example',

Callers 1

constructorMethod · 0.95

Calls 8

waitForReadyMethod · 0.95
searchCssTechniquesMethod · 0.95
searchCssDemosMethod · 0.95
getCssDemoMethod · 0.95
getCssArticleMethod · 0.95
listCssCategoriesMethod · 0.95
getRandomCssTipMethod · 0.95
debugLogFunction · 0.70

Tested by

no test coverage detected