Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCP support #1

Closed
muka opened this issue Dec 28, 2024 · 6 comments
Closed

MCP support #1

muka opened this issue Dec 28, 2024 · 6 comments

Comments

@muka
Copy link

muka commented Dec 28, 2024

Hi, good project thank you for sharing.

I have been playing with it in test project

I would see a nice improvement in a more integrated way to use MCP to handle tools and prompt. What do you think?

@nbonamy
Copy link
Owner

nbonamy commented Jan 2, 2025

Need to look deeper in MCP and figure out if it is a concern for this lib or something on top of it.

@muka
Copy link
Author

muka commented Jan 2, 2025

It's surely something on top on it. The main takeaway from my experience (but limited to openai) is that Plugin tool parameters schema could directly support a JSON schema structure in addition to the current one.

@nbonamy
Copy link
Owner

nbonamy commented Jan 3, 2025

There was already a mechanism to do that but I made it a bit more explicit in 2.6.4:

As in tests/mocks/plugins.ts:

export class Plugin4 extends Plugin {

  isEnabled(): boolean {
    return true
  }
  
  getName(): string {
    return 'plugin4'
  }

  /* this is what is new / important */
  isCustomTool(): boolean {
    return true
  }

  getDescription(): string {
    return 'Plugin 4'
  }

  async getTools(): Promise<any|any[]> {
    return {
      type: 'function',
      function: {
        name: 'plugin4',
        description: 'Plugin 4',
        parameters: {
          type: 'object',
          properties: { },
          required: [],
        },
      },
    }
  }
}

Is that good enough or do you need more than that?

@muka
Copy link
Author

muka commented Jan 3, 2025

Thank you, this works perfectly for this use case.

@muka muka closed this as completed Jan 3, 2025
muka added a commit to muka/agents-test that referenced this issue Jan 3, 2025
@nbonamy
Copy link
Owner

nbonamy commented Jan 3, 2025

For information I created this some time ago: https://github.com/nbonamy/nestor. Watch the linked videos if you are interested!

@muka
Copy link
Author

muka commented Jan 3, 2025

oh oooh, on it thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants