env_group_remove_scope
Remove a directory scope from an environment group in API Testing MCP. Specify the group name and optionally the directory path to remove the current directory.
Instructions
Quita un directorio (scope) de un grupo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group | Yes | Nombre del grupo | |
| scope | No | Ruta del directorio a quitar. Si se omite, usa el directorio actual |
Implementation Reference
- src/tools/environment.ts:596-607 (handler)Handler for env_group_remove_scope tool. Takes 'group' and optional 'scope' (defaults to CWD) params, calls storage.removeScopeFromGroup to remove the scope from the group.
async (params) => { try { const scope = params.scope ?? process.cwd() await storage.removeScopeFromGroup(params.group, scope) return { content: [{ type: 'text' as const, text: `Scope '${scope}' eliminado del grupo '${params.group}'` }], } } catch (error) { const message = error instanceof Error ? error.message : String(error) return { content: [{ type: 'text' as const, text: `Error: ${message}` }], isError: true } } }, - src/tools/environment.ts:591-594 (schema)Schema/input definition for env_group_remove_scope: 'group' (required string) and 'scope' (optional string, defaults to current directory).
'Quita un directorio (scope) de un grupo.', { group: z.string().describe('Nombre del grupo'), scope: z.string().optional().describe('Ruta del directorio a quitar. Si se omite, usa el directorio actual'), - src/tools/environment.ts:589-608 (registration)Registration of the 'env_group_remove_scope' tool on the MCP server using server.tool().
server.tool( 'env_group_remove_scope', 'Quita un directorio (scope) de un grupo.', { group: z.string().describe('Nombre del grupo'), scope: z.string().optional().describe('Ruta del directorio a quitar. Si se omite, usa el directorio actual'), }, async (params) => { try { const scope = params.scope ?? process.cwd() await storage.removeScopeFromGroup(params.group, scope) return { content: [{ type: 'text' as const, text: `Scope '${scope}' eliminado del grupo '${params.group}'` }], } } catch (error) { const message = error instanceof Error ? error.message : String(error) return { content: [{ type: 'text' as const, text: `Error: ${message}` }], isError: true } } }, ) - src/lib/storage.ts:444-453 (helper)Storage helper that removes a scope from a group by normalizing path, filtering it from group.scopes, updating timestamp, and saving.
async removeScopeFromGroup(groupName: string, scope: string): Promise<void> { const group = await this.getGroup(groupName) if (!group) { throw new Error(`Grupo '${groupName}' no encontrado`) } const normalized = scope.replace(/\\/g, '/') group.scopes = group.scopes.filter((s) => s !== normalized) group.updatedAt = new Date().toISOString() await this.saveGroup(group) }