Overview Returns a list of all enabled tools from a specific stack. This endpoint supports multiple schema formats to match different AI framework requirements, including OpenAI and Anthropic formats. 
Endpoint GET https://api.toolrouter.ai/v1/stacks/{stack_id}/tools Authentication This endpoint requires an API key. Include it in the Authorization header: 
Authorization:  Bearer  YOUR_API_KEY Path Parameters The unique identifier of the stack to get tools from 
Query Parameters The schema format for the returned tools Show Available Schema Formats
defaultopenaianthropic Response Array of tool objects formatted according to the specified schema Show Default Schema Tool Object
Unique name/identifier for the tool 
Description of what the tool does 
JSON schema defining the tool’s input parameters 
Server name that provides this tool 
Show OpenAI Schema Tool Object
Always “function” for OpenAI format 
Function definition object JSON schema for function parameters 
Show Anthropic Schema Tool Object
JSON schema for tool input 
Example Request curl  -X  GET  "https://api.toolrouter.ai/v1/stacks/stack_123e4567-e89b-12d3-a456-426614174000/tools"  \   -H  "Authorization: Bearer YOUR_API_KEY" 
curl  -X  GET  "https://api.toolrouter.ai/v1/stacks/stack_123e4567-e89b-12d3-a456-426614174000/tools?schema=openai"  \   -H  "Authorization: Bearer YOUR_API_KEY" 
curl  -X  GET  "https://api.toolrouter.ai/v1/stacks/stack_123e4567-e89b-12d3-a456-426614174000/tools?schema=anthropic"  \   -H  "Authorization: Bearer YOUR_API_KEY" 
Example Responses {   "tools" : [     {       "name" :  "gmail_send_email" ,       "description" :  "Send an email through Gmail" ,       "input_schema" : {         "type" :  "object" ,         "properties" : {           "to" : {             "type" :  "array" ,             "items" : { "type" :  "string" },             "description" :  "List of recipient email addresses"           },           "subject" : {             "type" :  "string" ,             "description" :  "Email subject"           },           "body" : {             "type" :  "string" ,             "description" :  "Email body content"           }         },         "required" : [ "to" ,  "subject" ,  "body" ]       },       "server" :  "gmail"     },     {       "name" :  "linear_create_issue" ,       "description" :  "Create a new issue in Linear" ,       "input_schema" : {         "type" :  "object" ,         "properties" : {           "title" : {             "type" :  "string" ,             "description" :  "Issue title"           },           "description" : {             "type" :  "string" ,             "description" :  "Issue description"           },           "teamId" : {             "type" :  "string" ,             "description" :  "Team ID"           }         },         "required" : [ "title" ,  "teamId" ]       },       "server" :  "linear"     }   ] } {   "tools" : [     {       "type" :  "function" ,       "function" : {         "name" :  "gmail_send_email" ,         "description" :  "Send an email through Gmail" ,         "parameters" : {           "type" :  "object" ,           "properties" : {             "to" : {               "type" :  "array" ,               "items" : { "type" :  "string" },               "description" :  "List of recipient email addresses"             },             "subject" : {               "type" :  "string" ,               "description" :  "Email subject"             },             "body" : {               "type" :  "string" ,               "description" :  "Email body content"             }           },           "required" : [ "to" ,  "subject" ,  "body" ]         }       }     },     {       "type" :  "function" ,       "function" : {         "name" :  "linear_create_issue" ,         "description" :  "Create a new issue in Linear" ,         "parameters" : {           "type" :  "object" ,           "properties" : {             "title" : {               "type" :  "string" ,               "description" :  "Issue title"             },             "description" : {               "type" :  "string" ,               "description" :  "Issue description"             },             "teamId" : {               "type" :  "string" ,               "description" :  "Team ID"             }           },           "required" : [ "title" ,  "teamId" ]         }       }     }   ] } {   "tools" : [     {       "name" :  "gmail_send_email" ,       "description" :  "Send an email through Gmail" ,       "input_schema" : {         "type" :  "object" ,         "properties" : {           "to" : {             "type" :  "array" ,             "items" : { "type" :  "string" },             "description" :  "List of recipient email addresses"           },           "subject" : {             "type" :  "string" ,             "description" :  "Email subject"           },           "body" : {             "type" :  "string" ,             "description" :  "Email body content"           }         },         "required" : [ "to" ,  "subject" ,  "body" ]       }     },     {       "name" :  "linear_create_issue" ,       "description" :  "Create a new issue in Linear" ,       "input_schema" : {         "type" :  "object" ,         "properties" : {           "title" : {             "type" :  "string" ,             "description" :  "Issue title"           },           "description" : {             "type" :  "string" ,             "description" :  "Issue description"           },           "teamId" : {             "type" :  "string" ,             "description" :  "Team ID"           }         },         "required" : [ "title" ,  "teamId" ]       }     }   ] } Integration Examples Using with OpenAI import  openai import  requests # Get tools in OpenAI format headers  =  { "Authorization" :  "Bearer YOUR_API_KEY" } tools_response  =  requests.get(     "https://api.toolrouter.ai/v1/stacks/stack_123e4567-e89b-12d3-a456-426614174000/tools?schema=openai" ,     headers = headers ) tools  =  tools_response.json()[ "tools" ] # Use with OpenAI chat completions response  =  openai.chat.completions.create(     model = "gpt-4" ,     messages = [{ "role" :  "user" ,  "content" :  "Send an email to john@example.com" }],     tools = tools ) Using with Anthropic import  anthropic import  requests # Get tools in Anthropic format headers  =  { "Authorization" :  "Bearer YOUR_API_KEY" } tools_response  =  requests.get(     "https://api.toolrouter.ai/v1/stacks/stack_123e4567-e89b-12d3-a456-426614174000/tools?schema=anthropic" ,     headers = headers ) tools  =  tools_response.json()[ "tools" ] # Use with Anthropic API client  =  anthropic.Anthropic() response  =  client.messages.create(     model = "claude-3-5-sonnet-20241022" ,     max_tokens = 1024 ,     tools = tools,     messages = [{ "role" :  "user" ,  "content" :  "Send an email to john@example.com" }] ) Use Cases 
AI Integration : Get tools in the format needed for your AI frameworkDynamic Tool Discovery : Programmatically discover available tools in a stackApplication Setup : Configure your application with the tools available in a stackDocumentation Generation : Generate tool documentation for your applications 
Error Responses Invalid or missing API key {   "detail" :  "Unauthorized" } Stack not found {   "detail" :  "Stack not found" } Rate limit exceeded {   "detail" :  "Too many requests" } 500 Internal Server Error
Server error occurred {   "detail" :  "Failed to get tools" }