|
|
import json |
|
|
|
|
|
tools = [ |
|
|
|
|
|
{ |
|
|
"name": "get_current_time", |
|
|
"minimal": "Returns the current server time in ISO 8601 format.", |
|
|
"full": "Retrieves the current date and time from the server's system clock. The time is returned in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm). This tool is useful for logging, timestamping events, or synchronization checks.", |
|
|
"schema": {"type": "object", "properties": {}, "required": []} |
|
|
}, |
|
|
{ |
|
|
"name": "calculate", |
|
|
"minimal": "Performs basic arithmetic operations (add, subtract, multiply, divide).", |
|
|
"full": "A general-purpose calculator tool capable of performing basic arithmetic operations. Supports addition, subtraction, multiplication, and division. Handles floating-point numbers. Returns the result of the operation or an error message if division by zero is attempted.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"operation": {"type": "string", "enum": ["add", "subtract", "multiply", "divide"], "description": "The arithmetic operation to perform."}, |
|
|
"a": {"type": "number", "description": "The first operand."}, |
|
|
"b": {"type": "number", "description": "The second operand."} |
|
|
}, |
|
|
"required": ["operation", "a", "b"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "generate_random", |
|
|
"minimal": "Generates a random integer within a specified range.", |
|
|
"full": "Generates a pseudo-random integer between a specified minimum and maximum value (inclusive). Useful for sampling, randomized testing, or making random decisions.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"min": {"type": "integer", "description": "The lower bound of the range (inclusive).", "default": 0}, |
|
|
"max": {"type": "integer", "description": "The upper bound of the range (inclusive).", "default": 100} |
|
|
}, |
|
|
"required": ["min", "max"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "echo_text", |
|
|
"minimal": "Returns the input text exactly as provided.", |
|
|
"full": "A diagnostic tool that echoes back the provided text input. Useful for testing connectivity, verifying character encoding, or simple heartbeat checks.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"text": {"type": "string", "description": "The text to echo back."} |
|
|
}, |
|
|
"required": ["text"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "reverse_string", |
|
|
"minimal": "Reverses the characters in a given string.", |
|
|
"full": "Takes an input string and returns a new string with the characters in reverse order. Useful for palindrome checking or simple text manipulation tasks.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"text": {"type": "string", "description": "The string to reverse."} |
|
|
}, |
|
|
"required": ["text"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "base64_encode", |
|
|
"minimal": "Encodes a text string into Base64 format.", |
|
|
"full": "Converts a plain text string into its Base64 encoded representation. Useful for safe data transmission over media that are designed to deal with textual data.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"text": {"type": "string", "description": "The text to encode."} |
|
|
}, |
|
|
"required": ["text"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "base64_decode", |
|
|
"minimal": "Decodes a Base64 string back to plain text.", |
|
|
"full": "Converts a Base64 encoded string back to its original plain text representation. Will return an error if the input is not valid Base64.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"encoded_text": {"type": "string", "description": "The Base64 string to decode."} |
|
|
}, |
|
|
"required": ["encoded_text"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "count_words", |
|
|
"minimal": "Counts the number of words in a given text.", |
|
|
"full": "Analyzes the input text and returns the count of words. Words are defined as sequences of characters separated by whitespace.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"text": {"type": "string", "description": "The text to analyze."} |
|
|
}, |
|
|
"required": ["text"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "convert_units", |
|
|
"minimal": "Converts values between standard units (km/miles, kg/lbs, c/f).", |
|
|
"full": "A utility for converting physical quantities between different units of measurement. Supported conversions: kilometers to miles, kilograms to pounds, and Celsius to Fahrenheit (and vice-versa).", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"value": {"type": "number", "description": "The numeric value to convert."}, |
|
|
"from_unit": {"type": "string", "enum": ["km", "miles", "kg", "lbs", "c", "f"], "description": "The unit of the input value."}, |
|
|
"to_unit": {"type": "string", "enum": ["km", "miles", "kg", "lbs", "c", "f"], "description": "The target unit for conversion."} |
|
|
}, |
|
|
"required": ["value", "from_unit", "to_unit"] |
|
|
} |
|
|
}, |
|
|
|
|
|
|
|
|
{ |
|
|
"name": "aws_ec2_launch_instance", |
|
|
"minimal": "Launches a new AWS EC2 instance with specified configuration.", |
|
|
"full": "Provisions a new Elastic Compute Cloud (EC2) instance in the specified AWS region. This tool supports comprehensive configuration options including Amazon Machine Image (AMI) selection, instance type definition (e.g., t3.micro, m5.large), VPC subnet placement, security group association, and IAM instance profile attachment. Users can also specify block device mappings, user data scripts for bootstrapping, and tag specifications for resource management. This operation is asynchronous; the tool returns the instance ID immediately, but the instance may take several minutes to reach the 'running' state.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"ami_id": {"type": "string", "description": "The ID of the Amazon Machine Image to use."}, |
|
|
"instance_type": {"type": "string", "description": "The compute instance type (e.g., t3.micro)."}, |
|
|
"subnet_id": {"type": "string", "description": "The ID of the subnet to launch the instance into."}, |
|
|
"security_group_ids": {"type": "array", "items": {"type": "string"}, "description": "List of security group IDs."}, |
|
|
"tags": {"type": "object", "description": "Key-value pairs for resource tagging."} |
|
|
}, |
|
|
"required": ["ami_id", "instance_type"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "aws_s3_create_bucket", |
|
|
"minimal": "Creates a new AWS S3 bucket with optional configuration.", |
|
|
"full": "Creates a new bucket in Amazon Simple Storage Service (S3). This tool allows for the configuration of bucket settings such as the AWS region, access control lists (ACLs) for permission management, server-side encryption (SSE) settings using KMS keys, and object ownership controls. Additionally, users can configure bucket versioning to preserve, retrieve, and restore every version of every object stored in the bucket, as well as lifecycle configuration rules to define actions on objects during their lifetime.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"bucket_name": {"type": "string", "description": "The globally unique name for the bucket."}, |
|
|
"region": {"type": "string", "description": "The AWS region to create the bucket in."}, |
|
|
"enable_versioning": {"type": "boolean", "description": "Whether to enable object versioning."}, |
|
|
"encryption": {"type": "string", "enum": ["AES256", "aws:kms"], "description": "Server-side encryption type."} |
|
|
}, |
|
|
"required": ["bucket_name"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "db_postgres_query", |
|
|
"minimal": "Executes a SQL query against a PostgreSQL database.", |
|
|
"full": "Executes a Structured Query Language (SQL) statement against a configured PostgreSQL database cluster. This tool supports SELECT, INSERT, UPDATE, and DELETE statements. It handles transaction management, connection pooling, and parameter sanitation to prevent SQL injection. The tool can return result sets for SELECT queries, including column metadata, or row modification counts for DML operations. Advanced features include support for prepared statements, timeout configuration, and read-only replays.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"query": {"type": "string", "description": "The SQL query to execute."}, |
|
|
"parameters": {"type": "array", "items": {"type": "string"}, "description": "Ordered list of parameters for the query."}, |
|
|
"timeout_ms": {"type": "integer", "description": "Query execution timeout in milliseconds.", "default": 5000} |
|
|
}, |
|
|
"required": ["query"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "db_mongo_find", |
|
|
"minimal": "Queries a MongoDB collection for documents matching a filter.", |
|
|
"full": "Performs a query operation on a MongoDB collection to find documents that match a specified filter criteria. This tool exposes the full power of the MongoDB query language, including comparison operators, logical operators, and element queries. Users can also specify projection documents to limit the fields returned, sort orders to organize results, and limit/skip parameters for pagination. The tool returns a list of JSON documents matching the query.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"collection": {"type": "string", "description": "The name of the collection to query."}, |
|
|
"filter": {"type": "object", "description": "The MongoDB query filter document."}, |
|
|
"projection": {"type": "object", "description": "Fields to include or exclude."}, |
|
|
"limit": {"type": "integer", "description": "Maximum number of documents to return.", "default": 20} |
|
|
}, |
|
|
"required": ["collection", "filter"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "jira_create_issue", |
|
|
"minimal": "Creates a new issue in a Jira project.", |
|
|
"full": "Creates a new issue (bug, story, task, etc.) in a specified Jira project. This tool allows for the comprehensive definition of the issue, including the summary, detailed description, priority level, assignee, and reporter. It also supports setting custom fields, adding labels, linking to an epic, and assigning to a specific sprint. Validation is performed against the project's issue type screen scheme to ensure all required fields are present.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"project_key": {"type": "string", "description": "The key of the project (e.g., PROJ)."}, |
|
|
"summary": {"type": "string", "description": "A brief summary of the issue."}, |
|
|
"description": {"type": "string", "description": "Detailed description of the issue."}, |
|
|
"issue_type": {"type": "string", "enum": ["Bug", "Story", "Task", "Epic"], "description": "The type of issue to create."}, |
|
|
"priority": {"type": "string", "enum": ["High", "Medium", "Low"], "description": "The priority of the issue."} |
|
|
}, |
|
|
"required": ["project_key", "summary", "issue_type"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "github_create_pull_request", |
|
|
"minimal": "Creates a new Pull Request in a GitHub repository.", |
|
|
"full": "Initiates a new Pull Request (PR) in a GitHub repository to merge changes from a head branch into a base branch. The tool supports setting the PR title, body content (with Markdown support), and assigning reviewers, assignees, labels, and milestones. It can also link the PR to related issues. Checks are performed to ensure the branches exist and that there are differences to be merged.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"repo_owner": {"type": "string", "description": "Owner of the repository."}, |
|
|
"repo_name": {"type": "string", "description": "Name of the repository."}, |
|
|
"title": {"type": "string", "description": "The title of the pull request."}, |
|
|
"head_branch": {"type": "string", "description": "The name of the branch where your changes are implemented."}, |
|
|
"base_branch": {"type": "string", "description": "The name of the branch you want the changes pulled into."}, |
|
|
"body": {"type": "string", "description": "The contents of the pull request."} |
|
|
}, |
|
|
"required": ["repo_owner", "repo_name", "title", "head_branch", "base_branch"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "slack_send_message", |
|
|
"minimal": "Sends a message to a Slack channel or user.", |
|
|
"full": "Posts a message to a specified Slack channel or direct message conversation. This tool supports simple text messages as well as complex layouts using Slack's Block Kit. Users can include attachments, images, and interactive elements like buttons or menus. The tool also allows for threading by providing a thread_ts value, enabling conversational flows within Slack.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"channel_id": {"type": "string", "description": "The ID of the channel or user to send to."}, |
|
|
"text": {"type": "string", "description": "The main text of the message."}, |
|
|
"blocks": {"type": "array", "description": "JSON structure for Block Kit layout.", "items": {"type": "object"}}, |
|
|
"thread_ts": {"type": "string", "description": "Timestamp of another message to reply in a thread."} |
|
|
}, |
|
|
"required": ["channel_id", "text"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "stripe_create_charge", |
|
|
"minimal": "Creates a charge on a credit card using Stripe.", |
|
|
"full": "Processes a payment by creating a charge object in the Stripe payment system. This tool requires a valid source (such as a token or card ID) and an amount. It supports specifying the currency, adding a description for the statement, and including arbitrary metadata. Options for capturing the charge immediately or later are also available. The tool returns the charge object status and ID.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"amount": {"type": "integer", "description": "Amount to charge in the smallest currency unit (e.g., cents)."}, |
|
|
"currency": {"type": "string", "description": "Three-letter ISO currency code (e.g., usd)."}, |
|
|
"source": {"type": "string", "description": "The ID of the source to charge."}, |
|
|
"description": {"type": "string", "description": "An arbitrary string attached to the object. Often useful for displaying to users."} |
|
|
}, |
|
|
"required": ["amount", "currency", "source"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "k8s_deploy_pod", |
|
|
"minimal": "Deploys a pod to a Kubernetes cluster.", |
|
|
"full": "Creates a Pod resource in a Kubernetes cluster. This tool allows for the specification of container images, resource requests and limits (CPU/Memory), environment variables, and volume mounts. It supports labels and annotations for organization and selection. The tool handles the submission of the Pod manifest to the Kubernetes API server and returns the created Pod's metadata.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"name": {"type": "string", "description": "The name of the pod."}, |
|
|
"namespace": {"type": "string", "description": "The namespace to deploy into.", "default": "default"}, |
|
|
"image": {"type": "string", "description": "The container image to run."}, |
|
|
"env_vars": {"type": "object", "description": "Environment variables for the container."} |
|
|
}, |
|
|
"required": ["name", "image"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "salesforce_update_lead", |
|
|
"minimal": "Updates a lead record in Salesforce.", |
|
|
"full": "Updates an existing Lead object in Salesforce. This tool requires the Lead ID and a map of fields to update. It supports standard fields (like Status, Company, Email) and custom fields defined in the Salesforce organization. The tool adheres to validation rules, assignment rules, and auto-response rules configured in the Salesforce instance. It returns the status of the update operation.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"lead_id": {"type": "string", "description": "The Salesforce ID of the lead."}, |
|
|
"fields": {"type": "object", "description": "Key-value pairs of field names and new values."} |
|
|
}, |
|
|
"required": ["lead_id", "fields"] |
|
|
} |
|
|
}, |
|
|
{ |
|
|
"name": "datadog_query_metrics", |
|
|
"minimal": "Queries time-series metrics from Datadog.", |
|
|
"full": "Retrieves metric data from Datadog for a specified time period. This tool accepts a metric query string (supporting aggregations like avg, sum, max over tags) and a timeframe (start and end timestamps). It can handle rollup functions to adjust data granularity. The tool returns a series of points representing the metric values over time, useful for monitoring and alerting validation.", |
|
|
"schema": { |
|
|
"type": "object", |
|
|
"properties": { |
|
|
"query": {"type": "string", "description": "The metric query string (e.g., avg:system.cpu.idle{host:host0})."}, |
|
|
"from_time": {"type": "integer", "description": "Start timestamp (Unix epoch)."}, |
|
|
"to_time": {"type": "integer", "description": "End timestamp (Unix epoch)."} |
|
|
}, |
|
|
"required": ["query", "from_time", "to_time"] |
|
|
} |
|
|
} |
|
|
] |
|
|
|
|
|
with open('app/data/tools_data.json', 'w') as f: |
|
|
json.dump(tools, f, indent=2) |
|
|
|
|
|
print("app/data/tools_data.json created successfully.") |
|
|
|
|
|
|