Skip to main content
Glama
smatiolids
by smatiolids
route.ts1.02 kB
import { NextRequest, NextResponse } from 'next/server'; import { getAstraClient } from '@/lib/astraClient'; export async function GET() { try { const client = getAstraClient(); const tools = await client.getTools(); return NextResponse.json({ success: true, tools }); } catch (error) { console.error('Error fetching tools:', error); return NextResponse.json( { success: false, error: error instanceof Error ? error.message : 'Failed to fetch tools' }, { status: 500 } ); } } export async function POST(request: NextRequest) { try { const tool = await request.json(); const client = getAstraClient(); await client.updateTool(tool); return NextResponse.json({ success: true }); } catch (error) { console.error('Error updating tool:', error); return NextResponse.json( { success: false, error: error instanceof Error ? error.message : 'Failed to update tool' }, { status: 500 } ); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/smatiolids/astra-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server