darabos's picture
Make MCP+Agents part of lynxkite-lynxscribe.
8d41b75
raw
history blame contribute delete
921 Bytes
from lynxkite_core import ops
from lynxkite_graph_analytics import core
lsop = ops.op_registration(
"LynxKite Graph Analytics", "LynxScribe", dir="bottom-to-top", color="blue"
)
dsop = ops.op_registration("LynxKite Graph Analytics", "Data Science")
@lsop("MCP: Query database with SQL", color="green")
def sql_tool(db: str):
return {
"command": ["npx", "-y", "mcp-sqlite", db],
"extra_prompt": """
When using the database, retrieve the list of tables, investigate the schema of the relevant tables
and use SQL queries. Always set a limit of 10 when using `read_records`. Unfortunately, `read_records`
is out of order currently. Please use `query` instead."
""".strip(),
}
@ops.output_position(output="top")
@dsop("Database")
def db(data_pipeline: list[core.Bundle]):
# The source of this file: https://github.com/biggraph/lynxscribe/pull/416
return "movie_data.sqlite.db"