query_peoplesoft_db
Execute direct SQL queries against a local SQLite database of PeopleSoft contracts and billing data, with schema introspection for accurate results.
Instructions
Query the local SQLite database directly.
When working with this database, follow these guidelines in order:
1. FIRST, discover what tables exist:
- Use: list_tables()
- Currently available: PROJECT, CA_DETAIL, CA_BILL_PLAN
2. SECOND, check the structure of a table before querying it:
- Use: describe_table('PROJECT')
- This shows all columns, their types, and which are primary keys
3. FINALLY, write your query using the discovered structure
- Use '?' placeholders for parameters (not Oracle-style ':1')
- Example: SELECT * FROM PROJECT WHERE BUSINESS_UNIT = ?
AVAILABLE RESOURCES:
- Use list_tables() to discover tables
- Use describe_table() to get table structure
- Use list_projects(), get_project_contracts(), list_contracts(), get_bill_plan()
for semantic access to the contracts/billing schema
:param sql_query: SQL query to execute (e.g., SELECT * FROM PROJECT WHERE BUSINESS_UNIT = ?)
:param parameters: List of query parameters (optional)
:return: A dictionary containing query results or an error message
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql_query | Yes | ||
| parameters | No |