Skip to main content

Update Tool Tutorial

Used to update the tutorial and documentation for a tool. This allows you to provide guidance, examples, and instructions to help users understand how to effectively use the tool.

API Endpoint

PropertyValue
Request MethodPOST
Request URLhttps://api.seliseblocks.com/tools/tutorial/{tool_id}

Request

Request Example

curl -X POST 'https://api.seliseblocks.com/tools/tutorial/{tool_id}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"tutorial": "# Customer API Tutorial\n\n## Getting Started\n\nThis API provides access to customer data...",
"documentation_url": "https://docs.example.com/customer-api",
"examples": {
"get_customer": "To retrieve a customer, call the get_customer action with the customer ID...",
"create_customer": "To create a new customer, provide the required fields: name, email, and phone..."
}
}'

Path Parameters

FieldTypeRequiredDescription
tool_idstringYesThe unique identifier of the tool.

Request Headers

FieldTypeRequiredDescription
acceptstringYesAccepted response format. Use application/json
Content-Typeapplication/jsonYesData type, must be application/json.

Request Body

Request Body Schema

{
"tutorial": "string",
"documentation_url": "string",
"examples": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}

Request Body Parameters

The request body is flexible and can include various documentation fields. Common fields include:

FieldTypeRequiredDescription
tutorialstringNoMain tutorial content (supports Markdown formatting).
documentation_urlstringNoURL to external documentation.
examplesobjectNoDictionary of usage examples keyed by action name.
quick_startstringNoQuick start guide for getting started quickly.
best_practicesstringNoBest practices and recommendations.
troubleshootingstringNoCommon issues and solutions.
faqstringNoFrequently asked questions and answers.
note

Tutorial Content Guidelines

  • Use Markdown formatting for rich text content
  • Include code examples with proper syntax highlighting
  • Organize content with clear headings and sections
  • Provide step-by-step instructions where applicable
  • Include screenshots or diagrams when helpful (as links)
  • Keep language clear and accessible
tip

Best practices for tool tutorials:

  • Start with a brief overview of what the tool does
  • Include a quick start section for immediate use
  • Provide examples for each major action
  • Document authentication requirements
  • Explain common use cases and workflows
  • Include troubleshooting tips for common issues
  • Link to external documentation for more details
  • Update tutorials when tool functionality changes

Effective tutorials include:

  • Clear prerequisites and setup instructions
  • Step-by-step guides for common tasks
  • Code examples with explanations
  • Expected input and output formats
  • Error handling examples
  • Performance considerations
  • Security best practices

Response

Success Response (200 OK)

Returns an object containing the update status.

{
"is_success": true,
"item_id": "tool_123",
"detail": "Tool tutorial updated successfully",
"error": {}
}

Response Fields

FieldTypeDescription
is_successbooleanIndicates whether the update was successful.
item_idstringThe identifier of the tool.
detailstringSuccess or failure message with additional context.
errorobjectError details if the operation failed (empty if successful).

Error Response (422 Unprocessable Entity)

Returns validation error details when the request body is invalid.

{
"detail": [
{
"loc": [
"path",
"tool_id"
],
"msg": "tool not found",
"type": "value_error.notfound"
}
]
}

Error Response Fields

FieldTypeDescription
detailarrayArray of validation error objects.
locarrayLocation of the error in the request (e.g., body field).
msgstringHuman-readable error message.
typestringError type identifier.

Error Codes

Status CodeDescriptionResponse Type
200Successful ResponseSuccess
400Bad Request - Invalid tutorial contentBad Request
404Not Found - Tool does not existNot Found
422Validation Error - Invalid request parametersUnprocessable Entity