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

Method setupHandlers

MCP/debug-local.js:168–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

166 }
167
168 setupHandlers() {
169 debugLog('🔗 Setting up request handlers...');
170
171 this.server.setRequestHandler(ListToolsRequestSchema, async () => {
172 try {
173 debugLog('📋 Received ListTools request');
174 await this.waitForReady();
175
176 const tools = [
177 {
178 name: 'search_css_techniques',
179 description: 'Search for CSS techniques with filtering and sorting options',
180 inputSchema: {
181 type: 'object',
182 properties: {
183 query: {
184 type: 'string',
185 description: 'Search query'
186 },
187 categories: {
188 type: 'array',
189 items: { type: 'string' },
190 description: 'Filter by categories'
191 },
192 tags: {
193 type: 'array',
194 items: { type: 'string' },
195 description: 'Filter by tags'
196 },
197 min_weight: {
198 type: 'number',
199 description: 'Minimum tag weight'
200 },
201 limit: {
202 type: 'number',
203 default: 10
204 }
205 },
206 required: ['query']
207 }
208 }
209 ];
210
211 return { tools };
212 } catch (error) {
213 debugLog('❌ Error in ListTools:', error);
214 throw error;
215 }
216 });
217
218 this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
219 const { name, arguments: args } = request.params;
220 debugLog(`🔧 Received CallTool request: ${name}`, args);
221
222 try {
223 await this.waitForReady();
224
225 switch (name) {

Callers 1

constructorMethod · 0.95

Calls 3

waitForReadyMethod · 0.95
searchCssTechniquesMethod · 0.95
debugLogFunction · 0.70

Tested by

no test coverage detected