# Parse Tools

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Parse Tools"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/api/v2/tool/parse"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Parse a tool definition from a pipeline (e.g. Agent).

This endpoint takes a tool definition as provided in a pipeline context (such as
when initializing an Agent with tools) and parses it into the format used by the
validate and create tool endpoints. This allows users to verify and create tools
based on definitions they are already using in their pipelines.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={undefined}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"additionalProperties":true,"type":"object"}],"description":"Model for parsing a list of tool definitions from a request.","title":"ParseToolsRequest"}}},"required":true}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{"items":{"anyOf":[{"description":"Model for the result of parsing an MCP server tool definition.","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description of what the tool does","title":"Description"},"mcp_server":{"description":"MCP server configuration data","properties":{"mcp_transport":{"description":"Transport protocol for the MCP server (sse or http)","enum":["sse","http"],"title":"MCPTransport","type":"string"},"secret":{"anyOf":[{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the secret.","title":"Secret Name"},"secret":{"description":"The secret you want to add.","title":"Secret","type":"string"}},"required":["secret"],"title":"Create Secret","type":"object"},{"type":"string"},{"type":"null"}],"description":"Optional secret to use for authentication. Can be a secret ID, a secret name or a new secret to create.","title":"Secret"},"url":{"description":"URL of the MCP server","title":"Url","type":"string"}},"required":["url","mcp_transport"],"title":"CreateMCPServerToolData","type":"object"},"name":{"description":"The name of the tool","title":"Name","type":"string"},"tool_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Unique identifier for the tool","title":"Tool Id"},"tool_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"List of enabled tool names","title":"Tool Names"},"tool_type":{"const":"mcp","default":"mcp","description":"Type of tool, must be 'mcp'","title":"Tool Type","type":"string"}},"required":["name","mcp_server"],"title":"MCPServerParseToolResponse","type":"object"},{"description":"Model for the result of parsing a pipeline tool definition.","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description of what the tool does","title":"Description"},"name":{"description":"The name of the tool","title":"Name","type":"string"},"pipeline":{"description":"Pipeline configuration data","properties":{"inputs_outputs":{"anyOf":[{"description":"Model for Pipeline tool inputs and outputs","properties":{"inputs":{"additionalProperties":{"description":"Model for tool input configuration.","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description explaining what this input represents and how it should be used","title":"Description"},"from":{"description":"Source location for the tool input (LLM or STATE)","enum":["LLM","STATE"],"title":"ToolInputFrom","type":"string"}},"required":["from"],"title":"ToolInputConfig","type":"object"},"description":"Mapping of input names to their configuration (source and optional description)","title":"Inputs","type":"object"},"outputs":{"additionalProperties":{"description":"Model for tool output configuration.","properties":{"to":{"description":"Destination location(s) for the tool output (LLM, STATE, or LLM_AND_STATE)","enum":["LLM","STATE","LLM_AND_STATE"],"title":"ToolOutputTo","type":"string"}},"required":["to"],"title":"ToolOutputConfig","type":"object"},"description":"Mapping of output names to their configuration (destination)","title":"Outputs","type":"object"}},"title":"PipelineToolInputsOutputs","type":"object"},{"type":"null"}],"description":"Inputs and outputs configuration for the pipeline tool."},"pipeline_definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"The definition of the pipeline as a dictionary","title":"Pipeline Definition"},"pipeline_template_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"The ID of the pipeline template to use.","title":"Pipeline Template Id"},"pipeline_version_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"The ID of the pipeline version to use.","title":"Pipeline Version Id"}},"title":"PipelineToolData","type":"object"},"tool_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Unique identifier for the tool","title":"Tool Id"},"tool_type":{"const":"pipeline","default":"pipeline","description":"Type of tool, must be 'pipeline'","title":"Tool Type","type":"string"}},"required":["name","pipeline"],"title":"PipelineParseToolResponse","type":"object"},{"description":"Model for the result of parsing a component tool definition.","properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description of what the tool does","title":"Description"},"name":{"description":"The name of the tool","title":"Name","type":"string"},"tool_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Unique identifier for the tool","title":"Tool Id"},"tool_type":{"const":"component","default":"component","description":"Type of tool, must be 'component'","title":"Tool Type","type":"string"}},"required":["name"],"title":"ComponentParseToolResponse","type":"object"},{"description":"Model for the result of parsing a code tool definition.","properties":{"code":{"description":"Code tool configuration data.","properties":{"code":{"description":"The code snippet to be executed as a tool.","title":"Code","type":"string"}},"required":["code"],"title":"CodeToolData","type":"object"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional description of what the tool does","title":"Description"},"name":{"description":"The name of the tool","title":"Name","type":"string"},"tool_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Unique identifier for the tool","title":"Tool Id"},"tool_type":{"const":"code","default":"code","description":"Type of tool, will be 'code'","title":"Tool Type","type":"string"}},"required":["name","code"],"title":"CodeParseToolResponse","type":"object"}]},"title":"Response Parse Tools Api V2 Tool Parse Post","type":"array"}}},"description":"Successful Response"},"400":{"description":"Raised when there is an error parsing a tool definition"},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"}}}
>
  
</StatusCodes>
