mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-05 04:17:32 +00:00
71 lines
No EOL
8.4 KiB
Text
71 lines
No EOL
8.4 KiB
Text
---
|
|
id: get-a-tool-by-its-name
|
|
title: "Get a tool by its name."
|
|
description: "Get a tool by its name."
|
|
sidebar_label: "Get a tool by its name."
|
|
hide_title: true
|
|
hide_table_of_contents: true
|
|
api: eJztWG1v2zYQ/iuEvjQBEjsNVnTNt2zpugLtGiQphiENAko6W2woUiMpJ4bh/747krIp2XkpsGEIEH8xJZHH493z3PFukRmwjVYWbHa0yA4PDuivBFsY0TihVXaUHbMLreUo28sKrRwoR1N400hRcJoy/m5p3iKzRQU1p5GbN4Ardf4dCocLG6MbME6EXUSJQsREgEnmWmeEmmZLP3mGU8w1qqZbU8C1KB+eeM/38GL4YS8D1dbZ0WVW6xIkPttKgCxxMENttbkucxyX3HELpLwtNC28nrSq8CbZy3JQRVVzc4Njh8aJf9dTo9smnLduXHblTWbRYN2sEia8lb0XqakvUFOmJ6w7+R7j8pbPLXtF01/5Q+HAb7P11EOBH09InKuA0TrmF+KjsOE5B6nVlB5IdG/pY5J/b2uu9g3wkucSWPKRdrytuFtvW2p0PDmMG16DA2MT+dwYPkfxwkFtHwePQgmPa/cHzupOvtq1p8L1fejY7pGeILYDo+loj4U1e0wgLaZgdv8rI6437ixp4O9WGEgRkKOlgasUZM60MNzyzwpQpAkgWAvGh04mm2gT/CbUTAeOh5NFsYtMK/gyQQqtNletlDhnQ5nkFZIu9z7YZOoAC8mLCILl1fAYO1/8iMtddhL0YjMuWwjK92wmJkxpx2K0KLMlnoWXpQjrTxN0Tbi0kBr3MsBtAzZ9bZIVqKcTTpLqFDRPV9Ab6n+6dilMhPLKeN25N/1oA0rZJ2EdoWJNooTIvCigcR4a+I1T8NpGpe3H/j/8uXG8xKHHKy1ZdxjGc92uI8qP+TDJN/2kEVPEIKgOnZtErYF7N7x6HLzhiLgFVxhfPYdukFT5nPEp6mHRtUtS/6dtufYCD0iqA/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obvx75flazcyGA9snx4f4H0+QfVqZ2/
|
|
sidebar_class_name: "get api-method"
|
|
info_path: docs/api/llama-stack-specification
|
|
custom_edit_url: null
|
|
---
|
|
|
|
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
|
|
import ParamsDetails from "@theme/ParamsDetails";
|
|
import RequestSchema from "@theme/RequestSchema";
|
|
import StatusCodes from "@theme/StatusCodes";
|
|
import OperationTabs from "@theme/OperationTabs";
|
|
import TabItem from "@theme/TabItem";
|
|
import Heading from "@theme/Heading";
|
|
|
|
<Heading
|
|
as={"h1"}
|
|
className={"openapi__heading"}
|
|
children={"Get a tool by its name."}
|
|
>
|
|
</Heading>
|
|
|
|
<MethodEndpoint
|
|
method={"get"}
|
|
path={"/v1/tools/{tool_name}"}
|
|
context={"endpoint"}
|
|
>
|
|
|
|
</MethodEndpoint>
|
|
|
|
|
|
|
|
Get a tool by its name.
|
|
|
|
<Heading
|
|
id={"request"}
|
|
as={"h2"}
|
|
className={"openapi-tabs__heading"}
|
|
children={"Request"}
|
|
>
|
|
</Heading>
|
|
|
|
<ParamsDetails
|
|
parameters={[{"name":"tool_name","in":"path","description":"The name of the tool to get.","required":true,"schema":{"type":"string"}}]}
|
|
>
|
|
|
|
</ParamsDetails>
|
|
|
|
<RequestSchema
|
|
title={"Body"}
|
|
body={undefined}
|
|
>
|
|
|
|
</RequestSchema>
|
|
|
|
<StatusCodes
|
|
id={undefined}
|
|
label={undefined}
|
|
responses={{"200":{"description":"A Tool.","content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string"},"provider_resource_id":{"type":"string"},"provider_id":{"type":"string"},"type":{"type":"string","enum":["model","shield","vector_db","dataset","scoring_function","benchmark","tool","tool_group","prompt"],"const":"tool","default":"tool","description":"Type of resource, always 'tool'"},"toolgroup_id":{"type":"string","description":"ID of the tool group this tool belongs to"},"description":{"type":"string","description":"Human-readable description of what the tool does"},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the parameter"},"parameter_type":{"type":"string","description":"Type of the parameter (e.g., string, integer)"},"description":{"type":"string","description":"Human-readable description of what the parameter does"},"required":{"type":"boolean","default":true,"description":"Whether this parameter is required for tool invocation"},"default":{"oneOf":[{"type":"null"},{"type":"boolean"},{"type":"number"},{"type":"string"},{"type":"array"},{"type":"object"}],"description":"(Optional) Default value for the parameter if not provided"}},"additionalProperties":false,"required":["name","parameter_type","description","required"],"title":"ToolParameter","description":"Parameter definition for a tool."},"description":"List of parameters this tool accepts"},"metadata":{"type":"object","additionalProperties":{"oneOf":[{"type":"null"},{"type":"boolean"},{"type":"number"},{"type":"string"},{"type":"array"},{"type":"object"}]},"description":"(Optional) Additional metadata about the tool"}},"additionalProperties":false,"required":["identifier","provider_id","type","toolgroup_id","description","parameters"],"title":"Tool","description":"A tool that can be invoked by agents."}}}},"400":{"description":"The request was invalid or malformed","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"title":{"type":"string","description":"Error title, a short summary of the error which is invariant for an error type"},"detail":{"type":"string","description":"Error detail, a longer human-readable description of the error"},"instance":{"type":"string","description":"(Optional) A URL which can be used to retrieve more information about the specific occurrence of the error"}},"additionalProperties":false,"required":["status","title","detail"],"title":"Error","description":"Error response from the API. Roughly follows RFC 7807."},"example":{"status":400,"title":"Bad Request","detail":"The request was invalid or malformed"}}}},"429":{"description":"The client has sent too many requests in a given amount of time","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"title":{"type":"string","description":"Error title, a short summary of the error which is invariant for an error type"},"detail":{"type":"string","description":"Error detail, a longer human-readable description of the error"},"instance":{"type":"string","description":"(Optional) A URL which can be used to retrieve more information about the specific occurrence of the error"}},"additionalProperties":false,"required":["status","title","detail"],"title":"Error","description":"Error response from the API. Roughly follows RFC 7807."},"example":{"status":429,"title":"Too Many Requests","detail":"You have exceeded the rate limit. Please try again later."}}}},"500":{"description":"The server encountered an unexpected error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"title":{"type":"string","description":"Error title, a short summary of the error which is invariant for an error type"},"detail":{"type":"string","description":"Error detail, a longer human-readable description of the error"},"instance":{"type":"string","description":"(Optional) A URL which can be used to retrieve more information about the specific occurrence of the error"}},"additionalProperties":false,"required":["status","title","detail"],"title":"Error","description":"Error response from the API. Roughly follows RFC 7807."},"example":{"status":500,"title":"Internal Server Error","detail":"An unexpected error occurred. Our team has been notified."}}}},"default":{"description":"An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"title":{"type":"string","description":"Error title, a short summary of the error which is invariant for an error type"},"detail":{"type":"string","description":"Error detail, a longer human-readable description of the error"},"instance":{"type":"string","description":"(Optional) A URL which can be used to retrieve more information about the specific occurrence of the error"}},"additionalProperties":false,"required":["status","title","detail"],"title":"Error","description":"Error response from the API. Roughly follows RFC 7807."},"example":{"status":0,"title":"Error","detail":"An unexpected error occurred"}}}}}}
|
|
>
|
|
|
|
</StatusCodes>
|
|
|
|
|
|
|